@opencode/schema 0.0.0-dev-1180 → 0.0.0-dev-1189

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.
@@ -2,6 +2,7 @@ export * as ConfigExperimental from "./experimental.js";
2
2
  import { Schema } from "effect";
3
3
  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
+ readonly codemode_vm: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
5
6
  readonly all_flags: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
6
7
  readonly part_rows: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
7
8
  readonly image_generate: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Boolean, Schema.Struct<{
@@ -62,7 +63,6 @@ declare const Info_base: Schema.Class<Info, Schema.Struct<{
62
63
  }>, never, never>>>, never, never>;
63
64
  readonly artifacts: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
64
65
  readonly background_compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
65
- readonly codemode_vm: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
66
66
  readonly console_watches: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
67
67
  readonly mcp_events: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
68
68
  readonly media_blob: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
@@ -8,6 +8,9 @@ export class Info extends Schema.Class("ConfigExperimental.Info")({
8
8
  portable_shell_scanner: Schema.Boolean.pipe(optional).annotate({
9
9
  description: "Deprecated: the built-in shell permission scanner is now always enabled.",
10
10
  }),
11
+ codemode_vm: Schema.Boolean.pipe(optional).annotate({
12
+ description: "Deprecated: ignored because Code Mode always runs on the VM.",
13
+ }),
11
14
  all_flags: Schema.Boolean.pipe(optional).annotate({
12
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.",
13
16
  }),
@@ -12,7 +12,6 @@ export declare const registry: {
12
12
  readonly media_blob: "Store new session media once in a deduplicated blob table instead of inline in every message row.";
13
13
  readonly schedules: "Enable experimental scheduled tasks that wake a session with a prompt.";
14
14
  readonly artifacts: "Enable experimental artifacts backed by pluggable providers.";
15
- readonly codemode_vm: "Run the Code Mode execute tool on the experimental bytecode VM instead of the legacy interpreter.";
16
15
  readonly shell_timeout_background: "Move foreground shell commands to the background when their timeout expires.";
17
16
  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.";
18
17
  readonly mcp_events: "Enable experimental MCP Events, a draft MCP extension: declare support to MCP servers and read the events of servers that offer them.";
@@ -12,7 +12,6 @@ export const registry = {
12
12
  media_blob: "Store new session media once in a deduplicated blob table instead of inline in every message row.",
13
13
  schedules: "Enable experimental scheduled tasks that wake a session with a prompt.",
14
14
  artifacts: "Enable experimental artifacts backed by pluggable providers.",
15
- codemode_vm: "Run the Code Mode execute tool on the experimental bytecode VM instead of the legacy interpreter.",
16
15
  shell_timeout_background: "Move foreground shell commands to the background when their timeout expires.",
17
16
  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.",
18
17
  mcp_events: "Enable experimental MCP Events, a draft MCP extension: declare support to MCP servers and read the events of servers that offer them.",
@@ -2548,6 +2548,62 @@ export declare const ServerDefinitions: readonly [Schema.Struct<{
2548
2548
  readonly snapshot: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Snapshot.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Snapshot.ID">>, never, never>;
2549
2549
  readonly started: Schema.Int;
2550
2550
  }>;
2551
+ }, Schema.Struct<{
2552
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
2553
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
2554
+ };
2555
+ readonly created: Schema.Finite;
2556
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
2557
+ readonly type: Schema.Literal<"session.step.first-token">;
2558
+ readonly durable: Schema.Struct<{
2559
+ readonly aggregateID: Schema.String;
2560
+ readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
2561
+ readonly version: Schema.decodeTo<Schema.toType<Schema.brand<Schema.Int, "Event.Version">>, Schema.Literal<number>, never, never>;
2562
+ }>;
2563
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2564
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
2565
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
2566
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
2567
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
2568
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
2569
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
2570
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
2571
+ }>, never, never>;
2572
+ }>>>, Schema.optionalKey<Schema.Struct<{
2573
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
2574
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
2575
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
2576
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
2577
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
2578
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
2579
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
2580
+ }>, never, never>;
2581
+ }>>, never, never>;
2582
+ readonly data: Schema.Struct<{
2583
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
2584
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
2585
+ };
2586
+ readonly assistantMessageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
2587
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
2588
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
2589
+ };
2590
+ }>;
2591
+ }> & {
2592
+ type: "session.step.first-token";
2593
+ durability: "durable";
2594
+ durable: {
2595
+ readonly version: number;
2596
+ readonly aggregate: string;
2597
+ };
2598
+ data: Schema.Struct<{
2599
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
2600
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
2601
+ };
2602
+ readonly assistantMessageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
2603
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
2604
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
2605
+ };
2606
+ }>;
2551
2607
  }, Schema.Struct<{
2552
2608
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
2553
2609
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
@@ -8932,6 +8988,62 @@ export declare const Definitions: readonly [Schema.Struct<{
8932
8988
  readonly snapshot: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Snapshot.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Snapshot.ID">>, never, never>;
8933
8989
  readonly started: Schema.Int;
8934
8990
  }>;
8991
+ }, Schema.Struct<{
8992
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
8993
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
8994
+ };
8995
+ readonly created: Schema.Finite;
8996
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
8997
+ readonly type: Schema.Literal<"session.step.first-token">;
8998
+ readonly durable: Schema.Struct<{
8999
+ readonly aggregateID: Schema.String;
9000
+ readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
9001
+ readonly version: Schema.decodeTo<Schema.toType<Schema.brand<Schema.Int, "Event.Version">>, Schema.Literal<number>, never, never>;
9002
+ }>;
9003
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
9004
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
9005
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
9006
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
9007
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
9008
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
9009
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
9010
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
9011
+ }>, never, never>;
9012
+ }>>>, Schema.optionalKey<Schema.Struct<{
9013
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
9014
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
9015
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
9016
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
9017
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
9018
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
9019
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
9020
+ }>, never, never>;
9021
+ }>>, never, never>;
9022
+ readonly data: Schema.Struct<{
9023
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
9024
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
9025
+ };
9026
+ readonly assistantMessageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
9027
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
9028
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
9029
+ };
9030
+ }>;
9031
+ }> & {
9032
+ type: "session.step.first-token";
9033
+ durability: "durable";
9034
+ durable: {
9035
+ readonly version: number;
9036
+ readonly aggregate: string;
9037
+ };
9038
+ data: Schema.Struct<{
9039
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
9040
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
9041
+ };
9042
+ readonly assistantMessageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
9043
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
9044
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
9045
+ };
9046
+ }>;
8935
9047
  }, Schema.Struct<{
8936
9048
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
8937
9049
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
@@ -2639,6 +2639,65 @@ export declare namespace Step {
2639
2639
  }>;
2640
2640
  };
2641
2641
  type Started = typeof Started.Type;
2642
+ /** Records when the provider streamed the first output token, before the rest of the response. */
2643
+ const FirstToken: Schema.Struct<{
2644
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
2645
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
2646
+ };
2647
+ readonly created: Schema.Finite;
2648
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
2649
+ readonly type: Schema.Literal<"session.step.first-token">;
2650
+ readonly durable: Schema.Struct<{
2651
+ readonly aggregateID: Schema.String;
2652
+ readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
2653
+ readonly version: Schema.decodeTo<Schema.toType<Schema.brand<Schema.Int, "Event.Version">>, Schema.Literal<number>, never, never>;
2654
+ }>;
2655
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2656
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
2657
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
2658
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
2659
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
2660
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
2661
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
2662
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
2663
+ }>, never, never>;
2664
+ }>>>, Schema.optionalKey<Schema.Struct<{
2665
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
2666
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
2667
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
2668
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
2669
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
2670
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
2671
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
2672
+ }>, never, never>;
2673
+ }>>, never, never>;
2674
+ readonly data: Schema.Struct<{
2675
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
2676
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
2677
+ };
2678
+ readonly assistantMessageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
2679
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
2680
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
2681
+ };
2682
+ }>;
2683
+ }> & {
2684
+ type: "session.step.first-token";
2685
+ durability: "durable";
2686
+ durable: {
2687
+ readonly version: number;
2688
+ readonly aggregate: string;
2689
+ };
2690
+ data: Schema.Struct<{
2691
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
2692
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
2693
+ };
2694
+ readonly assistantMessageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
2695
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
2696
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
2697
+ };
2698
+ }>;
2699
+ };
2700
+ type FirstToken = typeof FirstToken.Type;
2642
2701
  /** Records the provider response-body boundary independently of tool settlement. */
2643
2702
  const Streamed: Schema.Struct<{
2644
2703
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
@@ -6811,6 +6870,62 @@ export declare const Definitions: readonly [Schema.Struct<{
6811
6870
  /** Request dispatch time, before waiting for provider output. */
6812
6871
  readonly started: Schema.Int;
6813
6872
  }>;
6873
+ }, Schema.Struct<{
6874
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
6875
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
6876
+ };
6877
+ readonly created: Schema.Finite;
6878
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
6879
+ readonly type: Schema.Literal<"session.step.first-token">;
6880
+ readonly durable: Schema.Struct<{
6881
+ readonly aggregateID: Schema.String;
6882
+ readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
6883
+ readonly version: Schema.decodeTo<Schema.toType<Schema.brand<Schema.Int, "Event.Version">>, Schema.Literal<number>, never, never>;
6884
+ }>;
6885
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
6886
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
6887
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
6888
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
6889
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
6890
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
6891
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
6892
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
6893
+ }>, never, never>;
6894
+ }>>>, Schema.optionalKey<Schema.Struct<{
6895
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
6896
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
6897
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
6898
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
6899
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
6900
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
6901
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
6902
+ }>, never, never>;
6903
+ }>>, never, never>;
6904
+ readonly data: Schema.Struct<{
6905
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
6906
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
6907
+ };
6908
+ readonly assistantMessageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
6909
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
6910
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
6911
+ };
6912
+ }>;
6913
+ }> & {
6914
+ type: "session.step.first-token";
6915
+ durability: "durable";
6916
+ durable: {
6917
+ readonly version: number;
6918
+ readonly aggregate: string;
6919
+ };
6920
+ data: Schema.Struct<{
6921
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
6922
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
6923
+ };
6924
+ readonly assistantMessageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
6925
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
6926
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
6927
+ };
6928
+ }>;
6814
6929
  }, Schema.Struct<{
6815
6930
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
6816
6931
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
@@ -11598,6 +11713,62 @@ export declare const DurableDefinitions: readonly [...((Schema.Struct<{
11598
11713
  readonly snapshot: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Snapshot.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Snapshot.ID">>, never, never>;
11599
11714
  readonly files: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.brand<Schema.String, "RelativePath">>>>, Schema.optionalKey<Schema.$Array<Schema.brand<Schema.String, "RelativePath">>>, never, never>;
11600
11715
  }>;
11716
+ }) | (Schema.Struct<{
11717
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
11718
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
11719
+ };
11720
+ readonly created: Schema.Finite;
11721
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
11722
+ readonly type: Schema.Literal<"session.step.first-token">;
11723
+ readonly durable: Schema.Struct<{
11724
+ readonly aggregateID: Schema.String;
11725
+ readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
11726
+ readonly version: Schema.decodeTo<Schema.toType<Schema.brand<Schema.Int, "Event.Version">>, Schema.Literal<number>, never, never>;
11727
+ }>;
11728
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
11729
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
11730
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
11731
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
11732
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
11733
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
11734
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
11735
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
11736
+ }>, never, never>;
11737
+ }>>>, Schema.optionalKey<Schema.Struct<{
11738
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
11739
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
11740
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
11741
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
11742
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
11743
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
11744
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
11745
+ }>, never, never>;
11746
+ }>>, never, never>;
11747
+ readonly data: Schema.Struct<{
11748
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
11749
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
11750
+ };
11751
+ readonly assistantMessageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
11752
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
11753
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
11754
+ };
11755
+ }>;
11756
+ }> & {
11757
+ type: "session.step.first-token";
11758
+ durability: "durable";
11759
+ durable: {
11760
+ readonly version: number;
11761
+ readonly aggregate: string;
11762
+ };
11763
+ data: Schema.Struct<{
11764
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
11765
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
11766
+ };
11767
+ readonly assistantMessageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
11768
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
11769
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
11770
+ };
11771
+ }>;
11601
11772
  }) | (Schema.Struct<{
11602
11773
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
11603
11774
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
@@ -15996,6 +16167,62 @@ export declare const Durable: Schema.toTaggedUnion<"type", readonly [...((Schema
15996
16167
  readonly snapshot: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Snapshot.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Snapshot.ID">>, never, never>;
15997
16168
  readonly files: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.brand<Schema.String, "RelativePath">>>>, Schema.optionalKey<Schema.$Array<Schema.brand<Schema.String, "RelativePath">>>, never, never>;
15998
16169
  }>;
16170
+ }) | (Schema.Struct<{
16171
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
16172
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
16173
+ };
16174
+ readonly created: Schema.Finite;
16175
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
16176
+ readonly type: Schema.Literal<"session.step.first-token">;
16177
+ readonly durable: Schema.Struct<{
16178
+ readonly aggregateID: Schema.String;
16179
+ readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
16180
+ readonly version: Schema.decodeTo<Schema.toType<Schema.brand<Schema.Int, "Event.Version">>, Schema.Literal<number>, never, never>;
16181
+ }>;
16182
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
16183
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
16184
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
16185
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
16186
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
16187
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
16188
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
16189
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
16190
+ }>, never, never>;
16191
+ }>>>, Schema.optionalKey<Schema.Struct<{
16192
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
16193
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
16194
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
16195
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
16196
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
16197
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
16198
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
16199
+ }>, never, never>;
16200
+ }>>, never, never>;
16201
+ readonly data: Schema.Struct<{
16202
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
16203
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
16204
+ };
16205
+ readonly assistantMessageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
16206
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
16207
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
16208
+ };
16209
+ }>;
16210
+ }> & {
16211
+ type: "session.step.first-token";
16212
+ durability: "durable";
16213
+ durable: {
16214
+ readonly version: number;
16215
+ readonly aggregate: string;
16216
+ };
16217
+ data: Schema.Struct<{
16218
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
16219
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
16220
+ };
16221
+ readonly assistantMessageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
16222
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
16223
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
16224
+ };
16225
+ }>;
15999
16226
  }) | (Schema.Struct<{
16000
16227
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
16001
16228
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
@@ -20080,6 +20307,62 @@ export declare const All: Schema.toTaggedUnion<"type", readonly [Schema.toTagged
20080
20307
  readonly snapshot: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Snapshot.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Snapshot.ID">>, never, never>;
20081
20308
  readonly files: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.brand<Schema.String, "RelativePath">>>>, Schema.optionalKey<Schema.$Array<Schema.brand<Schema.String, "RelativePath">>>, never, never>;
20082
20309
  }>;
20310
+ }) | (Schema.Struct<{
20311
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
20312
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
20313
+ };
20314
+ readonly created: Schema.Finite;
20315
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
20316
+ readonly type: Schema.Literal<"session.step.first-token">;
20317
+ readonly durable: Schema.Struct<{
20318
+ readonly aggregateID: Schema.String;
20319
+ readonly seq: Schema.brand<Schema.Int, "Event.Seq">;
20320
+ readonly version: Schema.decodeTo<Schema.toType<Schema.brand<Schema.Int, "Event.Version">>, Schema.Literal<number>, never, never>;
20321
+ }>;
20322
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
20323
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
20324
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
20325
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
20326
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
20327
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
20328
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
20329
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
20330
+ }>, never, never>;
20331
+ }>>>, Schema.optionalKey<Schema.Struct<{
20332
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
20333
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
20334
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
20335
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
20336
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
20337
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
20338
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
20339
+ }>, never, never>;
20340
+ }>>, never, never>;
20341
+ readonly data: Schema.Struct<{
20342
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
20343
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
20344
+ };
20345
+ readonly assistantMessageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
20346
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
20347
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
20348
+ };
20349
+ }>;
20350
+ }> & {
20351
+ type: "session.step.first-token";
20352
+ durability: "durable";
20353
+ durable: {
20354
+ readonly version: number;
20355
+ readonly aggregate: string;
20356
+ };
20357
+ data: Schema.Struct<{
20358
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
20359
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
20360
+ };
20361
+ readonly assistantMessageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
20362
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
20363
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
20364
+ };
20365
+ }>;
20083
20366
  }) | (Schema.Struct<{
20084
20367
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
20085
20368
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
@@ -288,6 +288,15 @@ export var Step;
288
288
  started: NonNegativeInt,
289
289
  },
290
290
  });
291
+ /** Records when the provider streamed the first output token, before the rest of the response. */
292
+ Step.FirstToken = Event.durable({
293
+ type: "session.step.first-token",
294
+ ...options,
295
+ schema: {
296
+ ...Base,
297
+ assistantMessageID: SessionMessage.ID,
298
+ },
299
+ });
291
300
  /** Records the provider response-body boundary independently of tool settlement. */
292
301
  Step.Streamed = Event.durable({
293
302
  type: "session.step.streamed",
@@ -555,7 +564,7 @@ export var RevertEvent;
555
564
  schema: { ...Base, to: SessionMessage.ID },
556
565
  });
557
566
  })(RevertEvent || (RevertEvent = {}));
558
- export const Definitions = Event.inventory(Created, AgentSelected, ModelSelected, Moved, Renamed, MetadataUpdated, Permissions, Viewed, Archived, Unarchived, UsageUpdated, Deleted, Forked, InboxDelivered, InboxEnqueued, InboxCancelled, InboxDeliveryChanged, Execution.Started, Execution.Succeeded, Execution.Failed, Execution.Interrupted, InstructionsUpdated, Synthetic, Skill.Activated, Shell.Started, Shell.Ended, Step.Started, Step.Streamed, Step.Ended, Step.Failed, Text.Started, Text.Delta, Text.Ended, Reasoning.Started, Reasoning.Delta, Reasoning.Ended, Tool.Input.Started, Tool.Input.Delta, Tool.Input.Ended, Tool.Called, Tool.Progress, Tool.Success, Tool.Failed, RetryScheduled, Compaction.Started, Compaction.Delta, Compaction.Ended, Compaction.Failed, RevertEvent.Staged, RevertEvent.Cleared, RevertEvent.Committed);
567
+ export const Definitions = Event.inventory(Created, AgentSelected, ModelSelected, Moved, Renamed, MetadataUpdated, Permissions, Viewed, Archived, Unarchived, UsageUpdated, Deleted, Forked, InboxDelivered, InboxEnqueued, InboxCancelled, InboxDeliveryChanged, Execution.Started, Execution.Succeeded, Execution.Failed, Execution.Interrupted, InstructionsUpdated, Synthetic, Skill.Activated, Shell.Started, Shell.Ended, Step.Started, Step.FirstToken, Step.Streamed, Step.Ended, Step.Failed, Text.Started, Text.Delta, Text.Ended, Reasoning.Started, Reasoning.Delta, Reasoning.Ended, Tool.Input.Started, Tool.Input.Delta, Tool.Input.Ended, Tool.Called, Tool.Progress, Tool.Success, Tool.Failed, RetryScheduled, Compaction.Started, Compaction.Delta, Compaction.Ended, Compaction.Failed, RevertEvent.Staged, RevertEvent.Cleared, RevertEvent.Committed);
559
568
  // Internal and replay-only events are excluded from the public manifest.
560
569
  export const DurableDefinitions = Event.inventory(...Definitions.filter((definition) => definition.durability === "durable"), UsageRecorded, MessageContentUpdated);
561
570
  export const EphemeralDefinitions = Event.inventory(...Definitions.filter((definition) => definition.durability === "ephemeral"));
@@ -1169,6 +1169,8 @@ export declare const Assistant: Schema.Struct<{
1169
1169
  }>>, never, never>;
1170
1170
  readonly time: Schema.Struct<{
1171
1171
  readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
1172
+ /** When the provider streamed the first output token, before the rest of the response. */
1173
+ readonly firstToken: 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>;
1172
1174
  /** When the provider response body ended, before tool settlement. */
1173
1175
  readonly streamed: 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>;
1174
1176
  readonly completed: 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>;
@@ -2068,6 +2070,8 @@ export declare const Info: Schema.Union<readonly [Schema.Struct<{
2068
2070
  }>>, never, never>;
2069
2071
  readonly time: Schema.Struct<{
2070
2072
  readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
2073
+ /** When the provider streamed the first output token, before the rest of the response. */
2074
+ readonly firstToken: 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>;
2071
2075
  /** When the provider response body ended, before tool settlement. */
2072
2076
  readonly streamed: 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>;
2073
2077
  readonly completed: 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>;
@@ -2855,6 +2859,8 @@ export declare const MediaInfo: Schema.Union<readonly [Schema.Struct<{
2855
2859
  }>>, never, never>;
2856
2860
  readonly time: Schema.Struct<{
2857
2861
  readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
2862
+ /** When the provider streamed the first output token, before the rest of the response. */
2863
+ readonly firstToken: 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>;
2858
2864
  /** When the provider response body ended, before tool settlement. */
2859
2865
  readonly streamed: 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>;
2860
2866
  readonly completed: 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>;
@@ -182,6 +182,8 @@ export const Assistant = Schema.Struct({
182
182
  retry: AssistantRetry.pipe(optional),
183
183
  time: Schema.Struct({
184
184
  created: DateTimeUtcFromMillis,
185
+ /** When the provider streamed the first output token, before the rest of the response. */
186
+ firstToken: DateTimeUtcFromMillis.pipe(optional),
185
187
  /** When the provider response body ended, before tool settlement. */
186
188
  streamed: DateTimeUtcFromMillis.pipe(optional),
187
189
  completed: DateTimeUtcFromMillis.pipe(optional),
@@ -743,6 +743,7 @@ export declare const Data: Schema.Struct<{
743
743
  }>>, never, never>;
744
744
  readonly time: Schema.Struct<{
745
745
  readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
746
+ readonly firstToken: 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>;
746
747
  readonly streamed: 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>;
747
748
  readonly completed: 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>;
748
749
  }>;
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-1180",
4
+ "version": "0.0.0-dev-1189",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {