@opencode/protocol 2.1.3 → 2.2.0

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.
Files changed (44) hide show
  1. package/dist/api.d.ts +6 -4
  2. package/dist/api.js +7 -5
  3. package/dist/client.d.ts +1 -0
  4. package/dist/client.js +16 -2
  5. package/dist/errors.d.ts +32 -0
  6. package/dist/errors.js +35 -0
  7. package/dist/groups/agent.d.ts +12 -2
  8. package/dist/groups/agent.js +2 -1
  9. package/dist/groups/debug.d.ts +14 -1
  10. package/dist/groups/debug.js +26 -0
  11. package/dist/groups/event.d.ts +1235 -1467
  12. package/dist/groups/event.js +9 -0
  13. package/dist/groups/experimental.d.ts +238 -0
  14. package/dist/groups/experimental.js +4 -0
  15. package/dist/groups/fs.d.ts +15 -3
  16. package/dist/groups/fs.js +27 -1
  17. package/dist/groups/generate.d.ts +194 -3
  18. package/dist/groups/generate.js +41 -5
  19. package/dist/groups/mcp.d.ts +49 -25
  20. package/dist/groups/mcp.js +40 -4
  21. package/dist/groups/media.d.ts +8 -0
  22. package/dist/groups/media.js +18 -0
  23. package/dist/groups/message.d.ts +2266 -27
  24. package/dist/groups/message.js +29 -4
  25. package/dist/groups/model.d.ts +47 -0
  26. package/dist/groups/model.js +8 -2
  27. package/dist/groups/permission.d.ts +6 -13
  28. package/dist/groups/permission.js +4 -3
  29. package/dist/groups/persistent-pty.d.ts +0 -8
  30. package/dist/groups/plugin.d.ts +18 -2
  31. package/dist/groups/plugin.js +15 -1
  32. package/dist/groups/provider.d.ts +24 -0
  33. package/dist/groups/pty.d.ts +33 -33
  34. package/dist/groups/server.d.ts +2 -0
  35. package/dist/groups/server.js +2 -0
  36. package/dist/groups/session.d.ts +609 -551
  37. package/dist/groups/session.js +18 -34
  38. package/dist/groups/usage.d.ts +95 -0
  39. package/dist/groups/usage.js +22 -0
  40. package/dist/groups/vcs.d.ts +2 -0
  41. package/dist/groups/vcs.js +1 -0
  42. package/dist/groups/voice.d.ts +2 -18
  43. package/dist/groups/voice.js +3 -19
  44. package/package.json +6 -4
@@ -10,7 +10,7 @@ export declare const SessionMessagesQuery: Schema.Struct<{
10
10
  export declare const PublicSessionMessage: Schema.Union<readonly [Schema.Struct<{
11
11
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
12
12
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
13
- fromEvent: (eventID: import("@opencode/schema/event").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
13
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
14
14
  };
15
15
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
16
16
  readonly time: Schema.Struct<{
@@ -22,7 +22,7 @@ export declare const PublicSessionMessage: Schema.Union<readonly [Schema.Struct<
22
22
  }>, Schema.Struct<{
23
23
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
24
24
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
25
- fromEvent: (eventID: import("@opencode/schema/event").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
25
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
26
26
  };
27
27
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
28
28
  readonly time: Schema.Struct<{
@@ -100,7 +100,7 @@ export declare const PublicSessionMessage: Schema.Union<readonly [Schema.Struct<
100
100
  }>, Schema.Struct<{
101
101
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
102
102
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
103
- fromEvent: (eventID: import("@opencode/schema/event").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
103
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
104
104
  };
105
105
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
106
106
  readonly time: Schema.Struct<{
@@ -130,7 +130,7 @@ export declare const PublicSessionMessage: Schema.Union<readonly [Schema.Struct<
130
130
  }>, Schema.Struct<{
131
131
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
132
132
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
133
- fromEvent: (eventID: import("@opencode/schema/event").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
133
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
134
134
  };
135
135
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
136
136
  readonly time: Schema.Struct<{
@@ -268,7 +268,7 @@ export declare const PublicSessionMessage: Schema.Union<readonly [Schema.Struct<
268
268
  }>, Schema.Struct<{
269
269
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
270
270
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
271
- fromEvent: (eventID: import("@opencode/schema/event").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
271
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
272
272
  };
273
273
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
274
274
  readonly time: Schema.Struct<{
@@ -280,7 +280,7 @@ export declare const PublicSessionMessage: Schema.Union<readonly [Schema.Struct<
280
280
  }>, Schema.Struct<{
281
281
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
282
282
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
283
- fromEvent: (eventID: import("@opencode/schema/event").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
283
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
284
284
  };
285
285
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
286
286
  readonly time: Schema.Struct<{
@@ -292,7 +292,7 @@ export declare const PublicSessionMessage: Schema.Union<readonly [Schema.Struct<
292
292
  }>, Schema.Struct<{
293
293
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
294
294
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
295
- fromEvent: (eventID: import("@opencode/schema/event").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
295
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
296
296
  };
297
297
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
298
298
  readonly time: Schema.Struct<{
@@ -305,7 +305,7 @@ export declare const PublicSessionMessage: Schema.Union<readonly [Schema.Struct<
305
305
  }>, Schema.Struct<{
306
306
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
307
307
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
308
- fromEvent: (eventID: import("@opencode/schema/event").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
308
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
309
309
  };
310
310
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
311
311
  readonly type: Schema.tag<"shell">;
@@ -334,7 +334,7 @@ export declare const PublicSessionMessage: Schema.Union<readonly [Schema.Struct<
334
334
  }>, Schema.Struct<{
335
335
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
336
336
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
337
- fromEvent: (eventID: import("@opencode/schema/event").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
337
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
338
338
  };
339
339
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
340
340
  readonly type: Schema.tag<"assistant">;
@@ -534,7 +534,7 @@ export declare const PublicSessionMessage: Schema.Union<readonly [Schema.Struct<
534
534
  }>, Schema.Union<readonly [Schema.Struct<{
535
535
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
536
536
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
537
- fromEvent: (eventID: import("@opencode/schema/event").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
537
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
538
538
  };
539
539
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
540
540
  readonly time: Schema.Struct<{
@@ -547,7 +547,7 @@ export declare const PublicSessionMessage: Schema.Union<readonly [Schema.Struct<
547
547
  }>, Schema.Struct<{
548
548
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
549
549
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
550
- fromEvent: (eventID: import("@opencode/schema/event").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
550
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
551
551
  };
552
552
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
553
553
  readonly time: Schema.Struct<{
@@ -628,7 +628,7 @@ export declare const PublicSessionMessage: Schema.Union<readonly [Schema.Struct<
628
628
  }>, Schema.Struct<{
629
629
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
630
630
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
631
- fromEvent: (eventID: import("@opencode/schema/event").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
631
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
632
632
  };
633
633
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
634
634
  readonly time: Schema.Struct<{
@@ -673,7 +673,7 @@ export declare const PublicSessionMessage: Schema.Union<readonly [Schema.Struct<
673
673
  }>]>, Schema.Struct<{
674
674
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
675
675
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
676
- fromEvent: (eventID: import("@opencode/schema/event").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
676
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
677
677
  };
678
678
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
679
679
  readonly time: Schema.Struct<{
@@ -703,10 +703,2249 @@ export declare const PublicSessionMessage: Schema.Union<readonly [Schema.Struct<
703
703
  readonly retryAfterMs: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
704
704
  }>>, never, never>;
705
705
  }>]>;
706
+ /**
707
+ * Experimental: {@link PublicSessionMessage} as sent to clients that opt in with `X-OpenCode-Capabilities:
708
+ * experimental-media-uri` while `experimental.media_blob` is on. User files stored in `blob` stay `media:` refs.
709
+ */
710
+ export declare const PublicMediaSessionMessage: Schema.Union<readonly [Schema.Struct<{
711
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
712
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
713
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
714
+ };
715
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
716
+ readonly time: Schema.Struct<{
717
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
718
+ }>;
719
+ readonly type: Schema.tag<"agent-switched">;
720
+ readonly agent: Schema.brand<Schema.String, "Agent.ID">;
721
+ readonly previous: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Agent.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Agent.ID">>, never, never>;
722
+ }>, Schema.Struct<{
723
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
724
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
725
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
726
+ };
727
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
728
+ readonly time: Schema.Struct<{
729
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
730
+ }>;
731
+ readonly type: Schema.tag<"model-switched">;
732
+ readonly model: Schema.Struct<{
733
+ readonly id: Schema.brand<Schema.String, "Model.ID">;
734
+ readonly providerID: Schema.brand<Schema.String, "Provider.ID"> & {
735
+ opencode: string & import("effect/Brand").Brand<"Provider.ID">;
736
+ anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
737
+ openai: string & import("effect/Brand").Brand<"Provider.ID">;
738
+ google: string & import("effect/Brand").Brand<"Provider.ID">;
739
+ googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
740
+ githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
741
+ amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
742
+ azure: string & import("effect/Brand").Brand<"Provider.ID">;
743
+ openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
744
+ mistral: string & import("effect/Brand").Brand<"Provider.ID">;
745
+ gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
746
+ };
747
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
748
+ }> & {
749
+ parse: (input: string) => {
750
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
751
+ readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
752
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
753
+ };
754
+ };
755
+ readonly previous: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
756
+ readonly id: Schema.brand<Schema.String, "Model.ID">;
757
+ readonly providerID: Schema.brand<Schema.String, "Provider.ID"> & {
758
+ opencode: string & import("effect/Brand").Brand<"Provider.ID">;
759
+ anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
760
+ openai: string & import("effect/Brand").Brand<"Provider.ID">;
761
+ google: string & import("effect/Brand").Brand<"Provider.ID">;
762
+ googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
763
+ githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
764
+ amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
765
+ azure: string & import("effect/Brand").Brand<"Provider.ID">;
766
+ openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
767
+ mistral: string & import("effect/Brand").Brand<"Provider.ID">;
768
+ gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
769
+ };
770
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
771
+ }> & {
772
+ parse: (input: string) => {
773
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
774
+ readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
775
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
776
+ };
777
+ }>>, Schema.optionalKey<Schema.Struct<{
778
+ readonly id: Schema.brand<Schema.String, "Model.ID">;
779
+ readonly providerID: Schema.brand<Schema.String, "Provider.ID"> & {
780
+ opencode: string & import("effect/Brand").Brand<"Provider.ID">;
781
+ anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
782
+ openai: string & import("effect/Brand").Brand<"Provider.ID">;
783
+ google: string & import("effect/Brand").Brand<"Provider.ID">;
784
+ googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
785
+ githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
786
+ amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
787
+ azure: string & import("effect/Brand").Brand<"Provider.ID">;
788
+ openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
789
+ mistral: string & import("effect/Brand").Brand<"Provider.ID">;
790
+ gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
791
+ };
792
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
793
+ }> & {
794
+ parse: (input: string) => {
795
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
796
+ readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
797
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
798
+ };
799
+ }>, never, never>;
800
+ }>, Schema.Struct<{
801
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
802
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
803
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
804
+ };
805
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
806
+ readonly time: Schema.Struct<{
807
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
808
+ }>;
809
+ readonly type: Schema.tag<"location-switched">;
810
+ readonly projectID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Project.ID"> & {
811
+ global: string & import("effect/Brand").Brand<"Project.ID">;
812
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Project.ID"> & {
813
+ global: string & import("effect/Brand").Brand<"Project.ID">;
814
+ }>, never, never>;
815
+ readonly subpath: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "RelativePath">>>, Schema.optionalKey<Schema.brand<Schema.String, "RelativePath">>, never, never>;
816
+ readonly location: Schema.Struct<{
817
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
818
+ }>;
819
+ readonly previous: Schema.optional<Schema.Struct<{
820
+ readonly location: Schema.Struct<{
821
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
822
+ }>;
823
+ readonly projectID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Project.ID"> & {
824
+ global: string & import("effect/Brand").Brand<"Project.ID">;
825
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Project.ID"> & {
826
+ global: string & import("effect/Brand").Brand<"Project.ID">;
827
+ }>, never, never>;
828
+ readonly subpath: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "RelativePath">>>, Schema.optionalKey<Schema.brand<Schema.String, "RelativePath">>, never, never>;
829
+ }>>;
830
+ }>, Schema.Struct<{
831
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
832
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
833
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
834
+ };
835
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
836
+ readonly time: Schema.Struct<{
837
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
838
+ }>;
839
+ readonly text: Schema.String;
840
+ readonly agents: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
841
+ readonly name: Schema.String;
842
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
843
+ readonly start: Schema.Finite;
844
+ readonly end: Schema.Finite;
845
+ readonly text: Schema.String;
846
+ }>>>, Schema.optionalKey<Schema.Struct<{
847
+ readonly start: Schema.Finite;
848
+ readonly end: Schema.Finite;
849
+ readonly text: Schema.String;
850
+ }>>, never, never>;
851
+ }>>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
852
+ readonly name: Schema.String;
853
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
854
+ readonly start: Schema.Finite;
855
+ readonly end: Schema.Finite;
856
+ readonly text: Schema.String;
857
+ }>>>, Schema.optionalKey<Schema.Struct<{
858
+ readonly start: Schema.Finite;
859
+ readonly end: Schema.Finite;
860
+ readonly text: Schema.String;
861
+ }>>, never, never>;
862
+ }>>>, never, never>;
863
+ readonly skills: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
864
+ readonly id: Schema.brand<Schema.String, "Skill.ID">;
865
+ readonly name: Schema.brand<Schema.String, "Skill.Name">;
866
+ readonly text: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
867
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
868
+ readonly start: Schema.Finite;
869
+ readonly end: Schema.Finite;
870
+ readonly text: Schema.String;
871
+ }>>>, Schema.optionalKey<Schema.Struct<{
872
+ readonly start: Schema.Finite;
873
+ readonly end: Schema.Finite;
874
+ readonly text: Schema.String;
875
+ }>>, never, never>;
876
+ }>>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
877
+ readonly id: Schema.brand<Schema.String, "Skill.ID">;
878
+ readonly name: Schema.brand<Schema.String, "Skill.Name">;
879
+ readonly text: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
880
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
881
+ readonly start: Schema.Finite;
882
+ readonly end: Schema.Finite;
883
+ readonly text: Schema.String;
884
+ }>>>, Schema.optionalKey<Schema.Struct<{
885
+ readonly start: Schema.Finite;
886
+ readonly end: Schema.Finite;
887
+ readonly text: Schema.String;
888
+ }>>, never, never>;
889
+ }>>>, never, never>;
890
+ readonly type: Schema.tag<"user">;
891
+ readonly files: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
892
+ readonly data: Schema.String;
893
+ readonly mime: Schema.String;
894
+ readonly source: Schema.Union<readonly [Schema.Struct<{
895
+ readonly type: Schema.Literal<"inline">;
896
+ }>, Schema.Struct<{
897
+ readonly type: Schema.Literal<"uri">;
898
+ readonly uri: Schema.String;
899
+ }>]>;
900
+ readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
901
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
902
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
903
+ readonly start: Schema.Finite;
904
+ readonly end: Schema.Finite;
905
+ readonly text: Schema.String;
906
+ }>>>, Schema.optionalKey<Schema.Struct<{
907
+ readonly start: Schema.Finite;
908
+ readonly end: Schema.Finite;
909
+ readonly text: Schema.String;
910
+ }>>, never, never>;
911
+ }> & {
912
+ create: (input: import("@opencode/schema/prompt").FileAttachment) => {
913
+ readonly data: string;
914
+ readonly mime: string;
915
+ readonly source: {
916
+ readonly type: "inline";
917
+ } | {
918
+ readonly type: "uri";
919
+ readonly uri: string;
920
+ };
921
+ readonly name?: string | undefined;
922
+ readonly description?: string | undefined;
923
+ readonly mention?: {
924
+ readonly start: number;
925
+ readonly end: number;
926
+ readonly text: string;
927
+ } | undefined;
928
+ };
929
+ }, Schema.Struct<{
930
+ readonly mime: Schema.String;
931
+ readonly source: Schema.Union<readonly [Schema.Struct<{
932
+ readonly type: Schema.Literal<"inline">;
933
+ }>, Schema.Struct<{
934
+ readonly type: Schema.Literal<"uri">;
935
+ readonly uri: Schema.String;
936
+ }>]>;
937
+ readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
938
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
939
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
940
+ readonly start: Schema.Finite;
941
+ readonly end: Schema.Finite;
942
+ readonly text: Schema.String;
943
+ }>>>, Schema.optionalKey<Schema.Struct<{
944
+ readonly start: Schema.Finite;
945
+ readonly end: Schema.Finite;
946
+ readonly text: Schema.String;
947
+ }>>, never, never>;
948
+ readonly uri: Schema.String;
949
+ readonly bytes: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
950
+ readonly width: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
951
+ readonly height: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
952
+ }>]>>>>, Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
953
+ readonly data: Schema.String;
954
+ readonly mime: Schema.String;
955
+ readonly source: Schema.Union<readonly [Schema.Struct<{
956
+ readonly type: Schema.Literal<"inline">;
957
+ }>, Schema.Struct<{
958
+ readonly type: Schema.Literal<"uri">;
959
+ readonly uri: Schema.String;
960
+ }>]>;
961
+ readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
962
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
963
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
964
+ readonly start: Schema.Finite;
965
+ readonly end: Schema.Finite;
966
+ readonly text: Schema.String;
967
+ }>>>, Schema.optionalKey<Schema.Struct<{
968
+ readonly start: Schema.Finite;
969
+ readonly end: Schema.Finite;
970
+ readonly text: Schema.String;
971
+ }>>, never, never>;
972
+ }> & {
973
+ create: (input: import("@opencode/schema/prompt").FileAttachment) => {
974
+ readonly data: string;
975
+ readonly mime: string;
976
+ readonly source: {
977
+ readonly type: "inline";
978
+ } | {
979
+ readonly type: "uri";
980
+ readonly uri: string;
981
+ };
982
+ readonly name?: string | undefined;
983
+ readonly description?: string | undefined;
984
+ readonly mention?: {
985
+ readonly start: number;
986
+ readonly end: number;
987
+ readonly text: string;
988
+ } | undefined;
989
+ };
990
+ }, Schema.Struct<{
991
+ readonly mime: Schema.String;
992
+ readonly source: Schema.Union<readonly [Schema.Struct<{
993
+ readonly type: Schema.Literal<"inline">;
994
+ }>, Schema.Struct<{
995
+ readonly type: Schema.Literal<"uri">;
996
+ readonly uri: Schema.String;
997
+ }>]>;
998
+ readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
999
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
1000
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1001
+ readonly start: Schema.Finite;
1002
+ readonly end: Schema.Finite;
1003
+ readonly text: Schema.String;
1004
+ }>>>, Schema.optionalKey<Schema.Struct<{
1005
+ readonly start: Schema.Finite;
1006
+ readonly end: Schema.Finite;
1007
+ readonly text: Schema.String;
1008
+ }>>, never, never>;
1009
+ readonly uri: Schema.String;
1010
+ readonly bytes: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1011
+ readonly width: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1012
+ readonly height: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1013
+ }>]>>>, never, never>;
1014
+ }>, Schema.Struct<{
1015
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
1016
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
1017
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
1018
+ };
1019
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1020
+ readonly time: Schema.Struct<{
1021
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
1022
+ }>;
1023
+ readonly text: Schema.String;
1024
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
1025
+ readonly type: Schema.tag<"synthetic">;
1026
+ }>, Schema.Struct<{
1027
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
1028
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
1029
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
1030
+ };
1031
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1032
+ readonly time: Schema.Struct<{
1033
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
1034
+ }>;
1035
+ readonly type: Schema.tag<"system">;
1036
+ readonly text: Schema.String;
1037
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
1038
+ }>, Schema.Struct<{
1039
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
1040
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
1041
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
1042
+ };
1043
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1044
+ readonly time: Schema.Struct<{
1045
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
1046
+ }>;
1047
+ readonly type: Schema.tag<"skill">;
1048
+ readonly skill: Schema.brand<Schema.String, "Skill.ID">;
1049
+ readonly name: Schema.brand<Schema.String, "Skill.Name">;
1050
+ readonly text: Schema.String;
1051
+ }>, Schema.Struct<{
1052
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
1053
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
1054
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
1055
+ };
1056
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1057
+ readonly type: Schema.tag<"shell">;
1058
+ readonly shellID: Schema.brand<Schema.String, "Shell.ID"> & {
1059
+ create: () => string & import("effect/Brand").Brand<"Shell.ID">;
1060
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Shell.ID">;
1061
+ };
1062
+ readonly command: Schema.String;
1063
+ readonly status: Schema.Literals<readonly ["running", "exited", "timeout", "killed"]>;
1064
+ readonly exit: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optionalKey<Schema.Number>, never, never>;
1065
+ readonly output: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1066
+ readonly output: Schema.String;
1067
+ readonly cursor: Schema.Int;
1068
+ readonly size: Schema.Int;
1069
+ readonly truncated: Schema.Boolean;
1070
+ }>>>, Schema.optionalKey<Schema.Struct<{
1071
+ readonly output: Schema.String;
1072
+ readonly cursor: Schema.Int;
1073
+ readonly size: Schema.Int;
1074
+ readonly truncated: Schema.Boolean;
1075
+ }>>, never, never>;
1076
+ readonly time: Schema.Struct<{
1077
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
1078
+ 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>;
1079
+ }>;
1080
+ }>, Schema.Struct<{
1081
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
1082
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
1083
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
1084
+ };
1085
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1086
+ readonly type: Schema.tag<"assistant">;
1087
+ readonly agent: Schema.brand<Schema.String, "Agent.ID">;
1088
+ readonly model: Schema.Struct<{
1089
+ readonly id: Schema.brand<Schema.String, "Model.ID">;
1090
+ readonly providerID: Schema.brand<Schema.String, "Provider.ID"> & {
1091
+ opencode: string & import("effect/Brand").Brand<"Provider.ID">;
1092
+ anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
1093
+ openai: string & import("effect/Brand").Brand<"Provider.ID">;
1094
+ google: string & import("effect/Brand").Brand<"Provider.ID">;
1095
+ googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
1096
+ githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
1097
+ amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
1098
+ azure: string & import("effect/Brand").Brand<"Provider.ID">;
1099
+ openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
1100
+ mistral: string & import("effect/Brand").Brand<"Provider.ID">;
1101
+ gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
1102
+ };
1103
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
1104
+ }> & {
1105
+ parse: (input: string) => {
1106
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
1107
+ readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
1108
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
1109
+ };
1110
+ };
1111
+ readonly content: Schema.$Array<Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
1112
+ readonly type: Schema.tag<"text">;
1113
+ readonly text: Schema.String;
1114
+ readonly native: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1115
+ }>, Schema.Struct<{
1116
+ readonly type: Schema.tag<"reasoning">;
1117
+ readonly text: Schema.String;
1118
+ readonly native: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1119
+ readonly time: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1120
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
1121
+ 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>;
1122
+ }>>>, Schema.optionalKey<Schema.Struct<{
1123
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
1124
+ 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>;
1125
+ }>>, never, never>;
1126
+ }>, Schema.Struct<{
1127
+ readonly type: Schema.tag<"tool">;
1128
+ readonly id: Schema.String;
1129
+ readonly name: Schema.String;
1130
+ readonly executed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
1131
+ readonly native: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1132
+ readonly state: Schema.toTaggedUnion<"status", readonly [Schema.Struct<{
1133
+ readonly status: Schema.tag<"streaming">;
1134
+ readonly input: Schema.String;
1135
+ }>, Schema.Struct<{
1136
+ readonly status: Schema.tag<"running">;
1137
+ readonly input: Schema.$Record<Schema.String, Schema.Unknown>;
1138
+ readonly metadata: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
1139
+ }>, Schema.Struct<{
1140
+ readonly status: Schema.tag<"completed">;
1141
+ readonly input: Schema.$Record<Schema.String, Schema.Unknown>;
1142
+ readonly content: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
1143
+ readonly type: Schema.Literal<"text">;
1144
+ readonly text: Schema.String;
1145
+ }>, Schema.Struct<{
1146
+ readonly type: Schema.Literal<"file">;
1147
+ readonly uri: Schema.String;
1148
+ readonly mime: Schema.String;
1149
+ readonly name: Schema.optional<Schema.String>;
1150
+ }>]>>;
1151
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>, never, never>;
1152
+ }>, Schema.Struct<{
1153
+ readonly status: Schema.tag<"error">;
1154
+ readonly input: Schema.$Record<Schema.String, Schema.Unknown>;
1155
+ readonly error: Schema.Struct<{
1156
+ readonly type: Schema.String;
1157
+ readonly message: Schema.String;
1158
+ readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1159
+ readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1160
+ readonly body: Schema.String;
1161
+ }>>>, Schema.optionalKey<Schema.Struct<{
1162
+ readonly body: Schema.String;
1163
+ }>>, never, never>;
1164
+ readonly retryAfterMs: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1165
+ }>;
1166
+ readonly content: Schema.decodeTo<Schema.optional<Schema.toType<Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
1167
+ readonly type: Schema.Literal<"text">;
1168
+ readonly text: Schema.String;
1169
+ }>, Schema.Struct<{
1170
+ readonly type: Schema.Literal<"file">;
1171
+ readonly uri: Schema.String;
1172
+ readonly mime: Schema.String;
1173
+ readonly name: Schema.optional<Schema.String>;
1174
+ }>]>>>>, Schema.optionalKey<Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
1175
+ readonly type: Schema.Literal<"text">;
1176
+ readonly text: Schema.String;
1177
+ }>, Schema.Struct<{
1178
+ readonly type: Schema.Literal<"file">;
1179
+ readonly uri: Schema.String;
1180
+ readonly mime: Schema.String;
1181
+ readonly name: Schema.optional<Schema.String>;
1182
+ }>]>>>, never, never>;
1183
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>, never, never>;
1184
+ }>]>;
1185
+ readonly time: Schema.Struct<{
1186
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
1187
+ readonly ran: 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>;
1188
+ 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>;
1189
+ }>;
1190
+ }>]>>;
1191
+ readonly snapshot: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1192
+ readonly start: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Snapshot.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Snapshot.ID">>, never, never>;
1193
+ readonly end: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Snapshot.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Snapshot.ID">>, never, never>;
1194
+ 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>;
1195
+ }>>>, Schema.optionalKey<Schema.Struct<{
1196
+ readonly start: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Snapshot.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Snapshot.ID">>, never, never>;
1197
+ readonly end: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Snapshot.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Snapshot.ID">>, never, never>;
1198
+ 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>;
1199
+ }>>, never, never>;
1200
+ readonly finish: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["stop", "length", "tool-calls", "content-filter", "error", "unknown"]>>>, Schema.optionalKey<Schema.Literals<readonly ["stop", "length", "tool-calls", "content-filter", "error", "unknown"]>>, never, never>;
1201
+ readonly rawFinish: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
1202
+ readonly native: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1203
+ readonly cost: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.Finite, "Money.USD"> & {
1204
+ zero: number & import("effect/Brand").Brand<"Money.USD">;
1205
+ }>>, Schema.optionalKey<Schema.brand<Schema.Finite, "Money.USD"> & {
1206
+ zero: number & import("effect/Brand").Brand<"Money.USD">;
1207
+ }>, never, never>;
1208
+ readonly tokens: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1209
+ readonly input: Schema.Finite;
1210
+ readonly output: Schema.Finite;
1211
+ readonly reasoning: Schema.Finite;
1212
+ readonly cache: Schema.Struct<{
1213
+ readonly read: Schema.Finite;
1214
+ readonly write: Schema.Finite;
1215
+ }>;
1216
+ }>>>, Schema.optionalKey<Schema.Struct<{
1217
+ readonly input: Schema.Finite;
1218
+ readonly output: Schema.Finite;
1219
+ readonly reasoning: Schema.Finite;
1220
+ readonly cache: Schema.Struct<{
1221
+ readonly read: Schema.Finite;
1222
+ readonly write: Schema.Finite;
1223
+ }>;
1224
+ }>>, never, never>;
1225
+ readonly error: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1226
+ readonly type: Schema.String;
1227
+ readonly message: Schema.String;
1228
+ readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1229
+ readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1230
+ readonly body: Schema.String;
1231
+ }>>>, Schema.optionalKey<Schema.Struct<{
1232
+ readonly body: Schema.String;
1233
+ }>>, never, never>;
1234
+ readonly retryAfterMs: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1235
+ }>>>, Schema.optionalKey<Schema.Struct<{
1236
+ readonly type: Schema.String;
1237
+ readonly message: Schema.String;
1238
+ readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1239
+ readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1240
+ readonly body: Schema.String;
1241
+ }>>>, Schema.optionalKey<Schema.Struct<{
1242
+ readonly body: Schema.String;
1243
+ }>>, never, never>;
1244
+ readonly retryAfterMs: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1245
+ }>>, never, never>;
1246
+ readonly retry: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1247
+ readonly attempt: Schema.Int;
1248
+ readonly at: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
1249
+ readonly error: Schema.Struct<{
1250
+ readonly type: Schema.String;
1251
+ readonly message: Schema.String;
1252
+ readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1253
+ readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1254
+ readonly body: Schema.String;
1255
+ }>>>, Schema.optionalKey<Schema.Struct<{
1256
+ readonly body: Schema.String;
1257
+ }>>, never, never>;
1258
+ readonly retryAfterMs: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1259
+ }>;
1260
+ }>>>, Schema.optionalKey<Schema.Struct<{
1261
+ readonly attempt: Schema.Int;
1262
+ readonly at: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
1263
+ readonly error: Schema.Struct<{
1264
+ readonly type: Schema.String;
1265
+ readonly message: Schema.String;
1266
+ readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1267
+ readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1268
+ readonly body: Schema.String;
1269
+ }>>>, Schema.optionalKey<Schema.Struct<{
1270
+ readonly body: Schema.String;
1271
+ }>>, never, never>;
1272
+ readonly retryAfterMs: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1273
+ }>;
1274
+ }>>, never, never>;
1275
+ readonly time: Schema.Struct<{
1276
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
1277
+ 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>;
1278
+ 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>;
1279
+ }>;
1280
+ }>, Schema.Union<readonly [Schema.Struct<{
1281
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
1282
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
1283
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
1284
+ };
1285
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1286
+ readonly time: Schema.Struct<{
1287
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
1288
+ }>;
1289
+ readonly type: Schema.tag<"compaction">;
1290
+ readonly status: Schema.tag<"running">;
1291
+ readonly reason: Schema.Literals<readonly ["auto", "manual"]>;
1292
+ readonly summary: Schema.String;
1293
+ }>, Schema.Struct<{
1294
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
1295
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
1296
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
1297
+ };
1298
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1299
+ readonly time: Schema.Struct<{
1300
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
1301
+ }>;
1302
+ readonly type: Schema.tag<"compaction">;
1303
+ readonly cost: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.Finite, "Money.USD"> & {
1304
+ zero: number & import("effect/Brand").Brand<"Money.USD">;
1305
+ }>>, Schema.optionalKey<Schema.brand<Schema.Finite, "Money.USD"> & {
1306
+ zero: number & import("effect/Brand").Brand<"Money.USD">;
1307
+ }>, never, never>;
1308
+ readonly tokens: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1309
+ readonly input: Schema.Finite;
1310
+ readonly output: Schema.Finite;
1311
+ readonly reasoning: Schema.Finite;
1312
+ readonly cache: Schema.Struct<{
1313
+ readonly read: Schema.Finite;
1314
+ readonly write: Schema.Finite;
1315
+ }>;
1316
+ }>>>, Schema.optionalKey<Schema.Struct<{
1317
+ readonly input: Schema.Finite;
1318
+ readonly output: Schema.Finite;
1319
+ readonly reasoning: Schema.Finite;
1320
+ readonly cache: Schema.Struct<{
1321
+ readonly read: Schema.Finite;
1322
+ readonly write: Schema.Finite;
1323
+ }>;
1324
+ }>>, never, never>;
1325
+ readonly status: Schema.tag<"completed">;
1326
+ readonly reason: Schema.Literals<readonly ["auto", "manual"]>;
1327
+ readonly model: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1328
+ readonly id: Schema.brand<Schema.String, "Model.ID">;
1329
+ readonly providerID: Schema.brand<Schema.String, "Provider.ID"> & {
1330
+ opencode: string & import("effect/Brand").Brand<"Provider.ID">;
1331
+ anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
1332
+ openai: string & import("effect/Brand").Brand<"Provider.ID">;
1333
+ google: string & import("effect/Brand").Brand<"Provider.ID">;
1334
+ googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
1335
+ githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
1336
+ amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
1337
+ azure: string & import("effect/Brand").Brand<"Provider.ID">;
1338
+ openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
1339
+ mistral: string & import("effect/Brand").Brand<"Provider.ID">;
1340
+ gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
1341
+ };
1342
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
1343
+ }> & {
1344
+ parse: (input: string) => {
1345
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
1346
+ readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
1347
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
1348
+ };
1349
+ }>>, Schema.optionalKey<Schema.Struct<{
1350
+ readonly id: Schema.brand<Schema.String, "Model.ID">;
1351
+ readonly providerID: Schema.brand<Schema.String, "Provider.ID"> & {
1352
+ opencode: string & import("effect/Brand").Brand<"Provider.ID">;
1353
+ anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
1354
+ openai: string & import("effect/Brand").Brand<"Provider.ID">;
1355
+ google: string & import("effect/Brand").Brand<"Provider.ID">;
1356
+ googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
1357
+ githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
1358
+ amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
1359
+ azure: string & import("effect/Brand").Brand<"Provider.ID">;
1360
+ openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
1361
+ mistral: string & import("effect/Brand").Brand<"Provider.ID">;
1362
+ gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
1363
+ };
1364
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
1365
+ }> & {
1366
+ parse: (input: string) => {
1367
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
1368
+ readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
1369
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
1370
+ };
1371
+ }>, never, never>;
1372
+ readonly native: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1373
+ readonly summary: Schema.String;
1374
+ }>, Schema.Struct<{
1375
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
1376
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
1377
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
1378
+ };
1379
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1380
+ readonly time: Schema.Struct<{
1381
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
1382
+ }>;
1383
+ readonly type: Schema.tag<"compaction">;
1384
+ readonly cost: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.Finite, "Money.USD"> & {
1385
+ zero: number & import("effect/Brand").Brand<"Money.USD">;
1386
+ }>>, Schema.optionalKey<Schema.brand<Schema.Finite, "Money.USD"> & {
1387
+ zero: number & import("effect/Brand").Brand<"Money.USD">;
1388
+ }>, never, never>;
1389
+ readonly tokens: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1390
+ readonly input: Schema.Finite;
1391
+ readonly output: Schema.Finite;
1392
+ readonly reasoning: Schema.Finite;
1393
+ readonly cache: Schema.Struct<{
1394
+ readonly read: Schema.Finite;
1395
+ readonly write: Schema.Finite;
1396
+ }>;
1397
+ }>>>, Schema.optionalKey<Schema.Struct<{
1398
+ readonly input: Schema.Finite;
1399
+ readonly output: Schema.Finite;
1400
+ readonly reasoning: Schema.Finite;
1401
+ readonly cache: Schema.Struct<{
1402
+ readonly read: Schema.Finite;
1403
+ readonly write: Schema.Finite;
1404
+ }>;
1405
+ }>>, never, never>;
1406
+ readonly status: Schema.tag<"failed">;
1407
+ readonly reason: Schema.Literals<readonly ["auto", "manual"]>;
1408
+ readonly error: Schema.Struct<{
1409
+ readonly type: Schema.String;
1410
+ readonly message: Schema.String;
1411
+ readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1412
+ readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1413
+ readonly body: Schema.String;
1414
+ }>>>, Schema.optionalKey<Schema.Struct<{
1415
+ readonly body: Schema.String;
1416
+ }>>, never, never>;
1417
+ readonly retryAfterMs: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1418
+ }>;
1419
+ }>]>, Schema.Struct<{
1420
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
1421
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
1422
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
1423
+ };
1424
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1425
+ readonly time: Schema.Struct<{
1426
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
1427
+ }>;
1428
+ readonly type: Schema.tag<"idle">;
1429
+ readonly outcome: Schema.Literals<readonly ["succeeded", "failed", "interrupted"]>;
1430
+ readonly error: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1431
+ readonly type: Schema.String;
1432
+ readonly message: Schema.String;
1433
+ readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1434
+ readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1435
+ readonly body: Schema.String;
1436
+ }>>>, Schema.optionalKey<Schema.Struct<{
1437
+ readonly body: Schema.String;
1438
+ }>>, never, never>;
1439
+ readonly retryAfterMs: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1440
+ }>>>, Schema.optionalKey<Schema.Struct<{
1441
+ readonly type: Schema.String;
1442
+ readonly message: Schema.String;
1443
+ readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1444
+ readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1445
+ readonly body: Schema.String;
1446
+ }>>>, Schema.optionalKey<Schema.Struct<{
1447
+ readonly body: Schema.String;
1448
+ }>>, never, never>;
1449
+ readonly retryAfterMs: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1450
+ }>>, never, never>;
1451
+ }>]>;
1452
+ /** Experimental: the `session.messages` response for clients that opt into `experimental-media-uri`. */
1453
+ export declare const SessionMediaMessagesResponse: Schema.Struct<{
1454
+ readonly data: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
1455
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
1456
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
1457
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
1458
+ };
1459
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1460
+ readonly time: Schema.Struct<{
1461
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
1462
+ }>;
1463
+ readonly type: Schema.tag<"agent-switched">;
1464
+ readonly agent: Schema.brand<Schema.String, "Agent.ID">;
1465
+ readonly previous: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Agent.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Agent.ID">>, never, never>;
1466
+ }>, Schema.Struct<{
1467
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
1468
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
1469
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
1470
+ };
1471
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1472
+ readonly time: Schema.Struct<{
1473
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
1474
+ }>;
1475
+ readonly type: Schema.tag<"model-switched">;
1476
+ readonly model: Schema.Struct<{
1477
+ readonly id: Schema.brand<Schema.String, "Model.ID">;
1478
+ readonly providerID: Schema.brand<Schema.String, "Provider.ID"> & {
1479
+ opencode: string & import("effect/Brand").Brand<"Provider.ID">;
1480
+ anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
1481
+ openai: string & import("effect/Brand").Brand<"Provider.ID">;
1482
+ google: string & import("effect/Brand").Brand<"Provider.ID">;
1483
+ googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
1484
+ githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
1485
+ amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
1486
+ azure: string & import("effect/Brand").Brand<"Provider.ID">;
1487
+ openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
1488
+ mistral: string & import("effect/Brand").Brand<"Provider.ID">;
1489
+ gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
1490
+ };
1491
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
1492
+ }> & {
1493
+ parse: (input: string) => {
1494
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
1495
+ readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
1496
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
1497
+ };
1498
+ };
1499
+ readonly previous: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1500
+ readonly id: Schema.brand<Schema.String, "Model.ID">;
1501
+ readonly providerID: Schema.brand<Schema.String, "Provider.ID"> & {
1502
+ opencode: string & import("effect/Brand").Brand<"Provider.ID">;
1503
+ anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
1504
+ openai: string & import("effect/Brand").Brand<"Provider.ID">;
1505
+ google: string & import("effect/Brand").Brand<"Provider.ID">;
1506
+ googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
1507
+ githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
1508
+ amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
1509
+ azure: string & import("effect/Brand").Brand<"Provider.ID">;
1510
+ openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
1511
+ mistral: string & import("effect/Brand").Brand<"Provider.ID">;
1512
+ gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
1513
+ };
1514
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
1515
+ }> & {
1516
+ parse: (input: string) => {
1517
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
1518
+ readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
1519
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
1520
+ };
1521
+ }>>, Schema.optionalKey<Schema.Struct<{
1522
+ readonly id: Schema.brand<Schema.String, "Model.ID">;
1523
+ readonly providerID: Schema.brand<Schema.String, "Provider.ID"> & {
1524
+ opencode: string & import("effect/Brand").Brand<"Provider.ID">;
1525
+ anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
1526
+ openai: string & import("effect/Brand").Brand<"Provider.ID">;
1527
+ google: string & import("effect/Brand").Brand<"Provider.ID">;
1528
+ googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
1529
+ githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
1530
+ amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
1531
+ azure: string & import("effect/Brand").Brand<"Provider.ID">;
1532
+ openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
1533
+ mistral: string & import("effect/Brand").Brand<"Provider.ID">;
1534
+ gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
1535
+ };
1536
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
1537
+ }> & {
1538
+ parse: (input: string) => {
1539
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
1540
+ readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
1541
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
1542
+ };
1543
+ }>, never, never>;
1544
+ }>, Schema.Struct<{
1545
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
1546
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
1547
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
1548
+ };
1549
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1550
+ readonly time: Schema.Struct<{
1551
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
1552
+ }>;
1553
+ readonly type: Schema.tag<"location-switched">;
1554
+ readonly projectID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Project.ID"> & {
1555
+ global: string & import("effect/Brand").Brand<"Project.ID">;
1556
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Project.ID"> & {
1557
+ global: string & import("effect/Brand").Brand<"Project.ID">;
1558
+ }>, never, never>;
1559
+ readonly subpath: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "RelativePath">>>, Schema.optionalKey<Schema.brand<Schema.String, "RelativePath">>, never, never>;
1560
+ readonly location: Schema.Struct<{
1561
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
1562
+ }>;
1563
+ readonly previous: Schema.optional<Schema.Struct<{
1564
+ readonly location: Schema.Struct<{
1565
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
1566
+ }>;
1567
+ readonly projectID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Project.ID"> & {
1568
+ global: string & import("effect/Brand").Brand<"Project.ID">;
1569
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Project.ID"> & {
1570
+ global: string & import("effect/Brand").Brand<"Project.ID">;
1571
+ }>, never, never>;
1572
+ readonly subpath: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "RelativePath">>>, Schema.optionalKey<Schema.brand<Schema.String, "RelativePath">>, never, never>;
1573
+ }>>;
1574
+ }>, Schema.Struct<{
1575
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
1576
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
1577
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
1578
+ };
1579
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1580
+ readonly time: Schema.Struct<{
1581
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
1582
+ }>;
1583
+ readonly text: Schema.String;
1584
+ readonly agents: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
1585
+ readonly name: Schema.String;
1586
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1587
+ readonly start: Schema.Finite;
1588
+ readonly end: Schema.Finite;
1589
+ readonly text: Schema.String;
1590
+ }>>>, Schema.optionalKey<Schema.Struct<{
1591
+ readonly start: Schema.Finite;
1592
+ readonly end: Schema.Finite;
1593
+ readonly text: Schema.String;
1594
+ }>>, never, never>;
1595
+ }>>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
1596
+ readonly name: Schema.String;
1597
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1598
+ readonly start: Schema.Finite;
1599
+ readonly end: Schema.Finite;
1600
+ readonly text: Schema.String;
1601
+ }>>>, Schema.optionalKey<Schema.Struct<{
1602
+ readonly start: Schema.Finite;
1603
+ readonly end: Schema.Finite;
1604
+ readonly text: Schema.String;
1605
+ }>>, never, never>;
1606
+ }>>>, never, never>;
1607
+ readonly skills: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
1608
+ readonly id: Schema.brand<Schema.String, "Skill.ID">;
1609
+ readonly name: Schema.brand<Schema.String, "Skill.Name">;
1610
+ readonly text: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
1611
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1612
+ readonly start: Schema.Finite;
1613
+ readonly end: Schema.Finite;
1614
+ readonly text: Schema.String;
1615
+ }>>>, Schema.optionalKey<Schema.Struct<{
1616
+ readonly start: Schema.Finite;
1617
+ readonly end: Schema.Finite;
1618
+ readonly text: Schema.String;
1619
+ }>>, never, never>;
1620
+ }>>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
1621
+ readonly id: Schema.brand<Schema.String, "Skill.ID">;
1622
+ readonly name: Schema.brand<Schema.String, "Skill.Name">;
1623
+ readonly text: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
1624
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1625
+ readonly start: Schema.Finite;
1626
+ readonly end: Schema.Finite;
1627
+ readonly text: Schema.String;
1628
+ }>>>, Schema.optionalKey<Schema.Struct<{
1629
+ readonly start: Schema.Finite;
1630
+ readonly end: Schema.Finite;
1631
+ readonly text: Schema.String;
1632
+ }>>, never, never>;
1633
+ }>>>, never, never>;
1634
+ readonly type: Schema.tag<"user">;
1635
+ readonly files: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
1636
+ readonly data: Schema.String;
1637
+ readonly mime: Schema.String;
1638
+ readonly source: Schema.Union<readonly [Schema.Struct<{
1639
+ readonly type: Schema.Literal<"inline">;
1640
+ }>, Schema.Struct<{
1641
+ readonly type: Schema.Literal<"uri">;
1642
+ readonly uri: Schema.String;
1643
+ }>]>;
1644
+ readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
1645
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
1646
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1647
+ readonly start: Schema.Finite;
1648
+ readonly end: Schema.Finite;
1649
+ readonly text: Schema.String;
1650
+ }>>>, Schema.optionalKey<Schema.Struct<{
1651
+ readonly start: Schema.Finite;
1652
+ readonly end: Schema.Finite;
1653
+ readonly text: Schema.String;
1654
+ }>>, never, never>;
1655
+ }> & {
1656
+ create: (input: import("@opencode/schema/prompt").FileAttachment) => {
1657
+ readonly data: string;
1658
+ readonly mime: string;
1659
+ readonly source: {
1660
+ readonly type: "inline";
1661
+ } | {
1662
+ readonly type: "uri";
1663
+ readonly uri: string;
1664
+ };
1665
+ readonly name?: string | undefined;
1666
+ readonly description?: string | undefined;
1667
+ readonly mention?: {
1668
+ readonly start: number;
1669
+ readonly end: number;
1670
+ readonly text: string;
1671
+ } | undefined;
1672
+ };
1673
+ }, Schema.Struct<{
1674
+ readonly mime: Schema.String;
1675
+ readonly source: Schema.Union<readonly [Schema.Struct<{
1676
+ readonly type: Schema.Literal<"inline">;
1677
+ }>, Schema.Struct<{
1678
+ readonly type: Schema.Literal<"uri">;
1679
+ readonly uri: Schema.String;
1680
+ }>]>;
1681
+ readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
1682
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
1683
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1684
+ readonly start: Schema.Finite;
1685
+ readonly end: Schema.Finite;
1686
+ readonly text: Schema.String;
1687
+ }>>>, Schema.optionalKey<Schema.Struct<{
1688
+ readonly start: Schema.Finite;
1689
+ readonly end: Schema.Finite;
1690
+ readonly text: Schema.String;
1691
+ }>>, never, never>;
1692
+ readonly uri: Schema.String;
1693
+ readonly bytes: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1694
+ readonly width: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1695
+ readonly height: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1696
+ }>]>>>>, Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
1697
+ readonly data: Schema.String;
1698
+ readonly mime: Schema.String;
1699
+ readonly source: Schema.Union<readonly [Schema.Struct<{
1700
+ readonly type: Schema.Literal<"inline">;
1701
+ }>, Schema.Struct<{
1702
+ readonly type: Schema.Literal<"uri">;
1703
+ readonly uri: Schema.String;
1704
+ }>]>;
1705
+ readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
1706
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
1707
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1708
+ readonly start: Schema.Finite;
1709
+ readonly end: Schema.Finite;
1710
+ readonly text: Schema.String;
1711
+ }>>>, Schema.optionalKey<Schema.Struct<{
1712
+ readonly start: Schema.Finite;
1713
+ readonly end: Schema.Finite;
1714
+ readonly text: Schema.String;
1715
+ }>>, never, never>;
1716
+ }> & {
1717
+ create: (input: import("@opencode/schema/prompt").FileAttachment) => {
1718
+ readonly data: string;
1719
+ readonly mime: string;
1720
+ readonly source: {
1721
+ readonly type: "inline";
1722
+ } | {
1723
+ readonly type: "uri";
1724
+ readonly uri: string;
1725
+ };
1726
+ readonly name?: string | undefined;
1727
+ readonly description?: string | undefined;
1728
+ readonly mention?: {
1729
+ readonly start: number;
1730
+ readonly end: number;
1731
+ readonly text: string;
1732
+ } | undefined;
1733
+ };
1734
+ }, Schema.Struct<{
1735
+ readonly mime: Schema.String;
1736
+ readonly source: Schema.Union<readonly [Schema.Struct<{
1737
+ readonly type: Schema.Literal<"inline">;
1738
+ }>, Schema.Struct<{
1739
+ readonly type: Schema.Literal<"uri">;
1740
+ readonly uri: Schema.String;
1741
+ }>]>;
1742
+ readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
1743
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
1744
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1745
+ readonly start: Schema.Finite;
1746
+ readonly end: Schema.Finite;
1747
+ readonly text: Schema.String;
1748
+ }>>>, Schema.optionalKey<Schema.Struct<{
1749
+ readonly start: Schema.Finite;
1750
+ readonly end: Schema.Finite;
1751
+ readonly text: Schema.String;
1752
+ }>>, never, never>;
1753
+ readonly uri: Schema.String;
1754
+ readonly bytes: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1755
+ readonly width: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1756
+ readonly height: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1757
+ }>]>>>, never, never>;
1758
+ }>, Schema.Struct<{
1759
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
1760
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
1761
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
1762
+ };
1763
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1764
+ readonly time: Schema.Struct<{
1765
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
1766
+ }>;
1767
+ readonly text: Schema.String;
1768
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
1769
+ readonly type: Schema.tag<"synthetic">;
1770
+ }>, Schema.Struct<{
1771
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
1772
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
1773
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
1774
+ };
1775
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1776
+ readonly time: Schema.Struct<{
1777
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
1778
+ }>;
1779
+ readonly type: Schema.tag<"system">;
1780
+ readonly text: Schema.String;
1781
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
1782
+ }>, Schema.Struct<{
1783
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
1784
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
1785
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
1786
+ };
1787
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1788
+ readonly time: Schema.Struct<{
1789
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
1790
+ }>;
1791
+ readonly type: Schema.tag<"skill">;
1792
+ readonly skill: Schema.brand<Schema.String, "Skill.ID">;
1793
+ readonly name: Schema.brand<Schema.String, "Skill.Name">;
1794
+ readonly text: Schema.String;
1795
+ }>, Schema.Struct<{
1796
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
1797
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
1798
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
1799
+ };
1800
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1801
+ readonly type: Schema.tag<"shell">;
1802
+ readonly shellID: Schema.brand<Schema.String, "Shell.ID"> & {
1803
+ create: () => string & import("effect/Brand").Brand<"Shell.ID">;
1804
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Shell.ID">;
1805
+ };
1806
+ readonly command: Schema.String;
1807
+ readonly status: Schema.Literals<readonly ["running", "exited", "timeout", "killed"]>;
1808
+ readonly exit: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optionalKey<Schema.Number>, never, never>;
1809
+ readonly output: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1810
+ readonly output: Schema.String;
1811
+ readonly cursor: Schema.Int;
1812
+ readonly size: Schema.Int;
1813
+ readonly truncated: Schema.Boolean;
1814
+ }>>>, Schema.optionalKey<Schema.Struct<{
1815
+ readonly output: Schema.String;
1816
+ readonly cursor: Schema.Int;
1817
+ readonly size: Schema.Int;
1818
+ readonly truncated: Schema.Boolean;
1819
+ }>>, never, never>;
1820
+ readonly time: Schema.Struct<{
1821
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
1822
+ 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>;
1823
+ }>;
1824
+ }>, Schema.Struct<{
1825
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
1826
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
1827
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
1828
+ };
1829
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1830
+ readonly type: Schema.tag<"assistant">;
1831
+ readonly agent: Schema.brand<Schema.String, "Agent.ID">;
1832
+ readonly model: Schema.Struct<{
1833
+ readonly id: Schema.brand<Schema.String, "Model.ID">;
1834
+ readonly providerID: Schema.brand<Schema.String, "Provider.ID"> & {
1835
+ opencode: string & import("effect/Brand").Brand<"Provider.ID">;
1836
+ anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
1837
+ openai: string & import("effect/Brand").Brand<"Provider.ID">;
1838
+ google: string & import("effect/Brand").Brand<"Provider.ID">;
1839
+ googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
1840
+ githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
1841
+ amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
1842
+ azure: string & import("effect/Brand").Brand<"Provider.ID">;
1843
+ openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
1844
+ mistral: string & import("effect/Brand").Brand<"Provider.ID">;
1845
+ gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
1846
+ };
1847
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
1848
+ }> & {
1849
+ parse: (input: string) => {
1850
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
1851
+ readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
1852
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
1853
+ };
1854
+ };
1855
+ readonly content: Schema.$Array<Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
1856
+ readonly type: Schema.tag<"text">;
1857
+ readonly text: Schema.String;
1858
+ readonly native: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1859
+ }>, Schema.Struct<{
1860
+ readonly type: Schema.tag<"reasoning">;
1861
+ readonly text: Schema.String;
1862
+ readonly native: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1863
+ readonly time: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1864
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
1865
+ 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>;
1866
+ }>>>, Schema.optionalKey<Schema.Struct<{
1867
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
1868
+ 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>;
1869
+ }>>, never, never>;
1870
+ }>, Schema.Struct<{
1871
+ readonly type: Schema.tag<"tool">;
1872
+ readonly id: Schema.String;
1873
+ readonly name: Schema.String;
1874
+ readonly executed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
1875
+ readonly native: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1876
+ readonly state: Schema.toTaggedUnion<"status", readonly [Schema.Struct<{
1877
+ readonly status: Schema.tag<"streaming">;
1878
+ readonly input: Schema.String;
1879
+ }>, Schema.Struct<{
1880
+ readonly status: Schema.tag<"running">;
1881
+ readonly input: Schema.$Record<Schema.String, Schema.Unknown>;
1882
+ readonly metadata: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
1883
+ }>, Schema.Struct<{
1884
+ readonly status: Schema.tag<"completed">;
1885
+ readonly input: Schema.$Record<Schema.String, Schema.Unknown>;
1886
+ readonly content: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
1887
+ readonly type: Schema.Literal<"text">;
1888
+ readonly text: Schema.String;
1889
+ }>, Schema.Struct<{
1890
+ readonly type: Schema.Literal<"file">;
1891
+ readonly uri: Schema.String;
1892
+ readonly mime: Schema.String;
1893
+ readonly name: Schema.optional<Schema.String>;
1894
+ }>]>>;
1895
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>, never, never>;
1896
+ }>, Schema.Struct<{
1897
+ readonly status: Schema.tag<"error">;
1898
+ readonly input: Schema.$Record<Schema.String, Schema.Unknown>;
1899
+ readonly error: Schema.Struct<{
1900
+ readonly type: Schema.String;
1901
+ readonly message: Schema.String;
1902
+ readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1903
+ readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1904
+ readonly body: Schema.String;
1905
+ }>>>, Schema.optionalKey<Schema.Struct<{
1906
+ readonly body: Schema.String;
1907
+ }>>, never, never>;
1908
+ readonly retryAfterMs: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1909
+ }>;
1910
+ readonly content: Schema.decodeTo<Schema.optional<Schema.toType<Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
1911
+ readonly type: Schema.Literal<"text">;
1912
+ readonly text: Schema.String;
1913
+ }>, Schema.Struct<{
1914
+ readonly type: Schema.Literal<"file">;
1915
+ readonly uri: Schema.String;
1916
+ readonly mime: Schema.String;
1917
+ readonly name: Schema.optional<Schema.String>;
1918
+ }>]>>>>, Schema.optionalKey<Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
1919
+ readonly type: Schema.Literal<"text">;
1920
+ readonly text: Schema.String;
1921
+ }>, Schema.Struct<{
1922
+ readonly type: Schema.Literal<"file">;
1923
+ readonly uri: Schema.String;
1924
+ readonly mime: Schema.String;
1925
+ readonly name: Schema.optional<Schema.String>;
1926
+ }>]>>>, never, never>;
1927
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>, never, never>;
1928
+ }>]>;
1929
+ readonly time: Schema.Struct<{
1930
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
1931
+ readonly ran: 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>;
1932
+ 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>;
1933
+ }>;
1934
+ }>]>>;
1935
+ readonly snapshot: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1936
+ readonly start: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Snapshot.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Snapshot.ID">>, never, never>;
1937
+ readonly end: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Snapshot.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Snapshot.ID">>, never, never>;
1938
+ 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>;
1939
+ }>>>, Schema.optionalKey<Schema.Struct<{
1940
+ readonly start: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Snapshot.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Snapshot.ID">>, never, never>;
1941
+ readonly end: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Snapshot.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Snapshot.ID">>, never, never>;
1942
+ 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>;
1943
+ }>>, never, never>;
1944
+ readonly finish: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["stop", "length", "tool-calls", "content-filter", "error", "unknown"]>>>, Schema.optionalKey<Schema.Literals<readonly ["stop", "length", "tool-calls", "content-filter", "error", "unknown"]>>, never, never>;
1945
+ readonly rawFinish: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
1946
+ readonly native: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1947
+ readonly cost: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.Finite, "Money.USD"> & {
1948
+ zero: number & import("effect/Brand").Brand<"Money.USD">;
1949
+ }>>, Schema.optionalKey<Schema.brand<Schema.Finite, "Money.USD"> & {
1950
+ zero: number & import("effect/Brand").Brand<"Money.USD">;
1951
+ }>, never, never>;
1952
+ readonly tokens: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1953
+ readonly input: Schema.Finite;
1954
+ readonly output: Schema.Finite;
1955
+ readonly reasoning: Schema.Finite;
1956
+ readonly cache: Schema.Struct<{
1957
+ readonly read: Schema.Finite;
1958
+ readonly write: Schema.Finite;
1959
+ }>;
1960
+ }>>>, Schema.optionalKey<Schema.Struct<{
1961
+ readonly input: Schema.Finite;
1962
+ readonly output: Schema.Finite;
1963
+ readonly reasoning: Schema.Finite;
1964
+ readonly cache: Schema.Struct<{
1965
+ readonly read: Schema.Finite;
1966
+ readonly write: Schema.Finite;
1967
+ }>;
1968
+ }>>, never, never>;
1969
+ readonly error: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1970
+ readonly type: Schema.String;
1971
+ readonly message: Schema.String;
1972
+ readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1973
+ readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1974
+ readonly body: Schema.String;
1975
+ }>>>, Schema.optionalKey<Schema.Struct<{
1976
+ readonly body: Schema.String;
1977
+ }>>, never, never>;
1978
+ readonly retryAfterMs: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1979
+ }>>>, Schema.optionalKey<Schema.Struct<{
1980
+ readonly type: Schema.String;
1981
+ readonly message: Schema.String;
1982
+ readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1983
+ readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1984
+ readonly body: Schema.String;
1985
+ }>>>, Schema.optionalKey<Schema.Struct<{
1986
+ readonly body: Schema.String;
1987
+ }>>, never, never>;
1988
+ readonly retryAfterMs: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1989
+ }>>, never, never>;
1990
+ readonly retry: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1991
+ readonly attempt: Schema.Int;
1992
+ readonly at: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
1993
+ readonly error: Schema.Struct<{
1994
+ readonly type: Schema.String;
1995
+ readonly message: Schema.String;
1996
+ readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
1997
+ readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1998
+ readonly body: Schema.String;
1999
+ }>>>, Schema.optionalKey<Schema.Struct<{
2000
+ readonly body: Schema.String;
2001
+ }>>, never, never>;
2002
+ readonly retryAfterMs: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
2003
+ }>;
2004
+ }>>>, Schema.optionalKey<Schema.Struct<{
2005
+ readonly attempt: Schema.Int;
2006
+ readonly at: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
2007
+ readonly error: Schema.Struct<{
2008
+ readonly type: Schema.String;
2009
+ readonly message: Schema.String;
2010
+ readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
2011
+ readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2012
+ readonly body: Schema.String;
2013
+ }>>>, Schema.optionalKey<Schema.Struct<{
2014
+ readonly body: Schema.String;
2015
+ }>>, never, never>;
2016
+ readonly retryAfterMs: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
2017
+ }>;
2018
+ }>>, never, never>;
2019
+ readonly time: Schema.Struct<{
2020
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
2021
+ 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>;
2022
+ 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>;
2023
+ }>;
2024
+ }>, Schema.Union<readonly [Schema.Struct<{
2025
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
2026
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
2027
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
2028
+ };
2029
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
2030
+ readonly time: Schema.Struct<{
2031
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
2032
+ }>;
2033
+ readonly type: Schema.tag<"compaction">;
2034
+ readonly status: Schema.tag<"running">;
2035
+ readonly reason: Schema.Literals<readonly ["auto", "manual"]>;
2036
+ readonly summary: Schema.String;
2037
+ }>, Schema.Struct<{
2038
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
2039
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
2040
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
2041
+ };
2042
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
2043
+ readonly time: Schema.Struct<{
2044
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
2045
+ }>;
2046
+ readonly type: Schema.tag<"compaction">;
2047
+ readonly cost: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.Finite, "Money.USD"> & {
2048
+ zero: number & import("effect/Brand").Brand<"Money.USD">;
2049
+ }>>, Schema.optionalKey<Schema.brand<Schema.Finite, "Money.USD"> & {
2050
+ zero: number & import("effect/Brand").Brand<"Money.USD">;
2051
+ }>, never, never>;
2052
+ readonly tokens: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2053
+ readonly input: Schema.Finite;
2054
+ readonly output: Schema.Finite;
2055
+ readonly reasoning: Schema.Finite;
2056
+ readonly cache: Schema.Struct<{
2057
+ readonly read: Schema.Finite;
2058
+ readonly write: Schema.Finite;
2059
+ }>;
2060
+ }>>>, Schema.optionalKey<Schema.Struct<{
2061
+ readonly input: Schema.Finite;
2062
+ readonly output: Schema.Finite;
2063
+ readonly reasoning: Schema.Finite;
2064
+ readonly cache: Schema.Struct<{
2065
+ readonly read: Schema.Finite;
2066
+ readonly write: Schema.Finite;
2067
+ }>;
2068
+ }>>, never, never>;
2069
+ readonly status: Schema.tag<"completed">;
2070
+ readonly reason: Schema.Literals<readonly ["auto", "manual"]>;
2071
+ readonly model: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2072
+ readonly id: Schema.brand<Schema.String, "Model.ID">;
2073
+ readonly providerID: Schema.brand<Schema.String, "Provider.ID"> & {
2074
+ opencode: string & import("effect/Brand").Brand<"Provider.ID">;
2075
+ anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
2076
+ openai: string & import("effect/Brand").Brand<"Provider.ID">;
2077
+ google: string & import("effect/Brand").Brand<"Provider.ID">;
2078
+ googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
2079
+ githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
2080
+ amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
2081
+ azure: string & import("effect/Brand").Brand<"Provider.ID">;
2082
+ openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
2083
+ mistral: string & import("effect/Brand").Brand<"Provider.ID">;
2084
+ gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
2085
+ };
2086
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
2087
+ }> & {
2088
+ parse: (input: string) => {
2089
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
2090
+ readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
2091
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
2092
+ };
2093
+ }>>, Schema.optionalKey<Schema.Struct<{
2094
+ readonly id: Schema.brand<Schema.String, "Model.ID">;
2095
+ readonly providerID: Schema.brand<Schema.String, "Provider.ID"> & {
2096
+ opencode: string & import("effect/Brand").Brand<"Provider.ID">;
2097
+ anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
2098
+ openai: string & import("effect/Brand").Brand<"Provider.ID">;
2099
+ google: string & import("effect/Brand").Brand<"Provider.ID">;
2100
+ googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
2101
+ githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
2102
+ amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
2103
+ azure: string & import("effect/Brand").Brand<"Provider.ID">;
2104
+ openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
2105
+ mistral: string & import("effect/Brand").Brand<"Provider.ID">;
2106
+ gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
2107
+ };
2108
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
2109
+ }> & {
2110
+ parse: (input: string) => {
2111
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
2112
+ readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
2113
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
2114
+ };
2115
+ }>, never, never>;
2116
+ readonly native: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
2117
+ readonly summary: Schema.String;
2118
+ }>, Schema.Struct<{
2119
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
2120
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
2121
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
2122
+ };
2123
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
2124
+ readonly time: Schema.Struct<{
2125
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
2126
+ }>;
2127
+ readonly type: Schema.tag<"compaction">;
2128
+ readonly cost: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.Finite, "Money.USD"> & {
2129
+ zero: number & import("effect/Brand").Brand<"Money.USD">;
2130
+ }>>, Schema.optionalKey<Schema.brand<Schema.Finite, "Money.USD"> & {
2131
+ zero: number & import("effect/Brand").Brand<"Money.USD">;
2132
+ }>, never, never>;
2133
+ readonly tokens: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2134
+ readonly input: Schema.Finite;
2135
+ readonly output: Schema.Finite;
2136
+ readonly reasoning: Schema.Finite;
2137
+ readonly cache: Schema.Struct<{
2138
+ readonly read: Schema.Finite;
2139
+ readonly write: Schema.Finite;
2140
+ }>;
2141
+ }>>>, Schema.optionalKey<Schema.Struct<{
2142
+ readonly input: Schema.Finite;
2143
+ readonly output: Schema.Finite;
2144
+ readonly reasoning: Schema.Finite;
2145
+ readonly cache: Schema.Struct<{
2146
+ readonly read: Schema.Finite;
2147
+ readonly write: Schema.Finite;
2148
+ }>;
2149
+ }>>, never, never>;
2150
+ readonly status: Schema.tag<"failed">;
2151
+ readonly reason: Schema.Literals<readonly ["auto", "manual"]>;
2152
+ readonly error: Schema.Struct<{
2153
+ readonly type: Schema.String;
2154
+ readonly message: Schema.String;
2155
+ readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
2156
+ readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2157
+ readonly body: Schema.String;
2158
+ }>>>, Schema.optionalKey<Schema.Struct<{
2159
+ readonly body: Schema.String;
2160
+ }>>, never, never>;
2161
+ readonly retryAfterMs: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
2162
+ }>;
2163
+ }>]>, Schema.Struct<{
2164
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
2165
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
2166
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
2167
+ };
2168
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
2169
+ readonly time: Schema.Struct<{
2170
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
2171
+ }>;
2172
+ readonly type: Schema.tag<"idle">;
2173
+ readonly outcome: Schema.Literals<readonly ["succeeded", "failed", "interrupted"]>;
2174
+ readonly error: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2175
+ readonly type: Schema.String;
2176
+ readonly message: Schema.String;
2177
+ readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
2178
+ readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2179
+ readonly body: Schema.String;
2180
+ }>>>, Schema.optionalKey<Schema.Struct<{
2181
+ readonly body: Schema.String;
2182
+ }>>, never, never>;
2183
+ readonly retryAfterMs: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
2184
+ }>>>, Schema.optionalKey<Schema.Struct<{
2185
+ readonly type: Schema.String;
2186
+ readonly message: Schema.String;
2187
+ readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
2188
+ readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2189
+ readonly body: Schema.String;
2190
+ }>>>, Schema.optionalKey<Schema.Struct<{
2191
+ readonly body: Schema.String;
2192
+ }>>, never, never>;
2193
+ readonly retryAfterMs: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
2194
+ }>>, never, never>;
2195
+ }>]>>;
2196
+ readonly cursor: Schema.Struct<{
2197
+ readonly previous: Schema.optional<Schema.String>;
2198
+ readonly next: Schema.optional<Schema.String>;
2199
+ }>;
2200
+ }>;
2201
+ /** Experimental: the `session.message` response for clients that opt into `experimental-media-uri`. */
2202
+ export declare const SessionMediaMessageResponse: Schema.Struct<{
2203
+ readonly data: Schema.Union<readonly [Schema.Struct<{
2204
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
2205
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
2206
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
2207
+ };
2208
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
2209
+ readonly time: Schema.Struct<{
2210
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
2211
+ }>;
2212
+ readonly type: Schema.tag<"agent-switched">;
2213
+ readonly agent: Schema.brand<Schema.String, "Agent.ID">;
2214
+ readonly previous: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Agent.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Agent.ID">>, never, never>;
2215
+ }>, Schema.Struct<{
2216
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
2217
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
2218
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
2219
+ };
2220
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
2221
+ readonly time: Schema.Struct<{
2222
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
2223
+ }>;
2224
+ readonly type: Schema.tag<"model-switched">;
2225
+ readonly model: Schema.Struct<{
2226
+ readonly id: Schema.brand<Schema.String, "Model.ID">;
2227
+ readonly providerID: Schema.brand<Schema.String, "Provider.ID"> & {
2228
+ opencode: string & import("effect/Brand").Brand<"Provider.ID">;
2229
+ anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
2230
+ openai: string & import("effect/Brand").Brand<"Provider.ID">;
2231
+ google: string & import("effect/Brand").Brand<"Provider.ID">;
2232
+ googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
2233
+ githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
2234
+ amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
2235
+ azure: string & import("effect/Brand").Brand<"Provider.ID">;
2236
+ openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
2237
+ mistral: string & import("effect/Brand").Brand<"Provider.ID">;
2238
+ gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
2239
+ };
2240
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
2241
+ }> & {
2242
+ parse: (input: string) => {
2243
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
2244
+ readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
2245
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
2246
+ };
2247
+ };
2248
+ readonly previous: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2249
+ readonly id: Schema.brand<Schema.String, "Model.ID">;
2250
+ readonly providerID: Schema.brand<Schema.String, "Provider.ID"> & {
2251
+ opencode: string & import("effect/Brand").Brand<"Provider.ID">;
2252
+ anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
2253
+ openai: string & import("effect/Brand").Brand<"Provider.ID">;
2254
+ google: string & import("effect/Brand").Brand<"Provider.ID">;
2255
+ googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
2256
+ githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
2257
+ amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
2258
+ azure: string & import("effect/Brand").Brand<"Provider.ID">;
2259
+ openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
2260
+ mistral: string & import("effect/Brand").Brand<"Provider.ID">;
2261
+ gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
2262
+ };
2263
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
2264
+ }> & {
2265
+ parse: (input: string) => {
2266
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
2267
+ readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
2268
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
2269
+ };
2270
+ }>>, Schema.optionalKey<Schema.Struct<{
2271
+ readonly id: Schema.brand<Schema.String, "Model.ID">;
2272
+ readonly providerID: Schema.brand<Schema.String, "Provider.ID"> & {
2273
+ opencode: string & import("effect/Brand").Brand<"Provider.ID">;
2274
+ anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
2275
+ openai: string & import("effect/Brand").Brand<"Provider.ID">;
2276
+ google: string & import("effect/Brand").Brand<"Provider.ID">;
2277
+ googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
2278
+ githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
2279
+ amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
2280
+ azure: string & import("effect/Brand").Brand<"Provider.ID">;
2281
+ openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
2282
+ mistral: string & import("effect/Brand").Brand<"Provider.ID">;
2283
+ gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
2284
+ };
2285
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
2286
+ }> & {
2287
+ parse: (input: string) => {
2288
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
2289
+ readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
2290
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
2291
+ };
2292
+ }>, never, never>;
2293
+ }>, Schema.Struct<{
2294
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
2295
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
2296
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
2297
+ };
2298
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
2299
+ readonly time: Schema.Struct<{
2300
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
2301
+ }>;
2302
+ readonly type: Schema.tag<"location-switched">;
2303
+ readonly projectID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Project.ID"> & {
2304
+ global: string & import("effect/Brand").Brand<"Project.ID">;
2305
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Project.ID"> & {
2306
+ global: string & import("effect/Brand").Brand<"Project.ID">;
2307
+ }>, never, never>;
2308
+ readonly subpath: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "RelativePath">>>, Schema.optionalKey<Schema.brand<Schema.String, "RelativePath">>, never, never>;
2309
+ readonly location: Schema.Struct<{
2310
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
2311
+ }>;
2312
+ readonly previous: Schema.optional<Schema.Struct<{
2313
+ readonly location: Schema.Struct<{
2314
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
2315
+ }>;
2316
+ readonly projectID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Project.ID"> & {
2317
+ global: string & import("effect/Brand").Brand<"Project.ID">;
2318
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Project.ID"> & {
2319
+ global: string & import("effect/Brand").Brand<"Project.ID">;
2320
+ }>, never, never>;
2321
+ readonly subpath: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "RelativePath">>>, Schema.optionalKey<Schema.brand<Schema.String, "RelativePath">>, never, never>;
2322
+ }>>;
2323
+ }>, Schema.Struct<{
2324
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
2325
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
2326
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
2327
+ };
2328
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
2329
+ readonly time: Schema.Struct<{
2330
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
2331
+ }>;
2332
+ readonly text: Schema.String;
2333
+ readonly agents: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
2334
+ readonly name: Schema.String;
2335
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2336
+ readonly start: Schema.Finite;
2337
+ readonly end: Schema.Finite;
2338
+ readonly text: Schema.String;
2339
+ }>>>, Schema.optionalKey<Schema.Struct<{
2340
+ readonly start: Schema.Finite;
2341
+ readonly end: Schema.Finite;
2342
+ readonly text: Schema.String;
2343
+ }>>, never, never>;
2344
+ }>>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
2345
+ readonly name: Schema.String;
2346
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2347
+ readonly start: Schema.Finite;
2348
+ readonly end: Schema.Finite;
2349
+ readonly text: Schema.String;
2350
+ }>>>, Schema.optionalKey<Schema.Struct<{
2351
+ readonly start: Schema.Finite;
2352
+ readonly end: Schema.Finite;
2353
+ readonly text: Schema.String;
2354
+ }>>, never, never>;
2355
+ }>>>, never, never>;
2356
+ readonly skills: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
2357
+ readonly id: Schema.brand<Schema.String, "Skill.ID">;
2358
+ readonly name: Schema.brand<Schema.String, "Skill.Name">;
2359
+ readonly text: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2360
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2361
+ readonly start: Schema.Finite;
2362
+ readonly end: Schema.Finite;
2363
+ readonly text: Schema.String;
2364
+ }>>>, Schema.optionalKey<Schema.Struct<{
2365
+ readonly start: Schema.Finite;
2366
+ readonly end: Schema.Finite;
2367
+ readonly text: Schema.String;
2368
+ }>>, never, never>;
2369
+ }>>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
2370
+ readonly id: Schema.brand<Schema.String, "Skill.ID">;
2371
+ readonly name: Schema.brand<Schema.String, "Skill.Name">;
2372
+ readonly text: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2373
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2374
+ readonly start: Schema.Finite;
2375
+ readonly end: Schema.Finite;
2376
+ readonly text: Schema.String;
2377
+ }>>>, Schema.optionalKey<Schema.Struct<{
2378
+ readonly start: Schema.Finite;
2379
+ readonly end: Schema.Finite;
2380
+ readonly text: Schema.String;
2381
+ }>>, never, never>;
2382
+ }>>>, never, never>;
2383
+ readonly type: Schema.tag<"user">;
2384
+ readonly files: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
2385
+ readonly data: Schema.String;
2386
+ readonly mime: Schema.String;
2387
+ readonly source: Schema.Union<readonly [Schema.Struct<{
2388
+ readonly type: Schema.Literal<"inline">;
2389
+ }>, Schema.Struct<{
2390
+ readonly type: Schema.Literal<"uri">;
2391
+ readonly uri: Schema.String;
2392
+ }>]>;
2393
+ readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2394
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2395
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2396
+ readonly start: Schema.Finite;
2397
+ readonly end: Schema.Finite;
2398
+ readonly text: Schema.String;
2399
+ }>>>, Schema.optionalKey<Schema.Struct<{
2400
+ readonly start: Schema.Finite;
2401
+ readonly end: Schema.Finite;
2402
+ readonly text: Schema.String;
2403
+ }>>, never, never>;
2404
+ }> & {
2405
+ create: (input: import("@opencode/schema/prompt").FileAttachment) => {
2406
+ readonly data: string;
2407
+ readonly mime: string;
2408
+ readonly source: {
2409
+ readonly type: "inline";
2410
+ } | {
2411
+ readonly type: "uri";
2412
+ readonly uri: string;
2413
+ };
2414
+ readonly name?: string | undefined;
2415
+ readonly description?: string | undefined;
2416
+ readonly mention?: {
2417
+ readonly start: number;
2418
+ readonly end: number;
2419
+ readonly text: string;
2420
+ } | undefined;
2421
+ };
2422
+ }, Schema.Struct<{
2423
+ readonly mime: Schema.String;
2424
+ readonly source: Schema.Union<readonly [Schema.Struct<{
2425
+ readonly type: Schema.Literal<"inline">;
2426
+ }>, Schema.Struct<{
2427
+ readonly type: Schema.Literal<"uri">;
2428
+ readonly uri: Schema.String;
2429
+ }>]>;
2430
+ readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2431
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2432
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2433
+ readonly start: Schema.Finite;
2434
+ readonly end: Schema.Finite;
2435
+ readonly text: Schema.String;
2436
+ }>>>, Schema.optionalKey<Schema.Struct<{
2437
+ readonly start: Schema.Finite;
2438
+ readonly end: Schema.Finite;
2439
+ readonly text: Schema.String;
2440
+ }>>, never, never>;
2441
+ readonly uri: Schema.String;
2442
+ readonly bytes: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
2443
+ readonly width: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
2444
+ readonly height: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
2445
+ }>]>>>>, Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
2446
+ readonly data: Schema.String;
2447
+ readonly mime: Schema.String;
2448
+ readonly source: Schema.Union<readonly [Schema.Struct<{
2449
+ readonly type: Schema.Literal<"inline">;
2450
+ }>, Schema.Struct<{
2451
+ readonly type: Schema.Literal<"uri">;
2452
+ readonly uri: Schema.String;
2453
+ }>]>;
2454
+ readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2455
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2456
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2457
+ readonly start: Schema.Finite;
2458
+ readonly end: Schema.Finite;
2459
+ readonly text: Schema.String;
2460
+ }>>>, Schema.optionalKey<Schema.Struct<{
2461
+ readonly start: Schema.Finite;
2462
+ readonly end: Schema.Finite;
2463
+ readonly text: Schema.String;
2464
+ }>>, never, never>;
2465
+ }> & {
2466
+ create: (input: import("@opencode/schema/prompt").FileAttachment) => {
2467
+ readonly data: string;
2468
+ readonly mime: string;
2469
+ readonly source: {
2470
+ readonly type: "inline";
2471
+ } | {
2472
+ readonly type: "uri";
2473
+ readonly uri: string;
2474
+ };
2475
+ readonly name?: string | undefined;
2476
+ readonly description?: string | undefined;
2477
+ readonly mention?: {
2478
+ readonly start: number;
2479
+ readonly end: number;
2480
+ readonly text: string;
2481
+ } | undefined;
2482
+ };
2483
+ }, Schema.Struct<{
2484
+ readonly mime: Schema.String;
2485
+ readonly source: Schema.Union<readonly [Schema.Struct<{
2486
+ readonly type: Schema.Literal<"inline">;
2487
+ }>, Schema.Struct<{
2488
+ readonly type: Schema.Literal<"uri">;
2489
+ readonly uri: Schema.String;
2490
+ }>]>;
2491
+ readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2492
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2493
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2494
+ readonly start: Schema.Finite;
2495
+ readonly end: Schema.Finite;
2496
+ readonly text: Schema.String;
2497
+ }>>>, Schema.optionalKey<Schema.Struct<{
2498
+ readonly start: Schema.Finite;
2499
+ readonly end: Schema.Finite;
2500
+ readonly text: Schema.String;
2501
+ }>>, never, never>;
2502
+ readonly uri: Schema.String;
2503
+ readonly bytes: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
2504
+ readonly width: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
2505
+ readonly height: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
2506
+ }>]>>>, never, never>;
2507
+ }>, Schema.Struct<{
2508
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
2509
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
2510
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
2511
+ };
2512
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
2513
+ readonly time: Schema.Struct<{
2514
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
2515
+ }>;
2516
+ readonly text: Schema.String;
2517
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2518
+ readonly type: Schema.tag<"synthetic">;
2519
+ }>, Schema.Struct<{
2520
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
2521
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
2522
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
2523
+ };
2524
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
2525
+ readonly time: Schema.Struct<{
2526
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
2527
+ }>;
2528
+ readonly type: Schema.tag<"system">;
2529
+ readonly text: Schema.String;
2530
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2531
+ }>, Schema.Struct<{
2532
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
2533
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
2534
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
2535
+ };
2536
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
2537
+ readonly time: Schema.Struct<{
2538
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
2539
+ }>;
2540
+ readonly type: Schema.tag<"skill">;
2541
+ readonly skill: Schema.brand<Schema.String, "Skill.ID">;
2542
+ readonly name: Schema.brand<Schema.String, "Skill.Name">;
2543
+ readonly text: Schema.String;
2544
+ }>, Schema.Struct<{
2545
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
2546
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
2547
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
2548
+ };
2549
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
2550
+ readonly type: Schema.tag<"shell">;
2551
+ readonly shellID: Schema.brand<Schema.String, "Shell.ID"> & {
2552
+ create: () => string & import("effect/Brand").Brand<"Shell.ID">;
2553
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Shell.ID">;
2554
+ };
2555
+ readonly command: Schema.String;
2556
+ readonly status: Schema.Literals<readonly ["running", "exited", "timeout", "killed"]>;
2557
+ readonly exit: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optionalKey<Schema.Number>, never, never>;
2558
+ readonly output: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2559
+ readonly output: Schema.String;
2560
+ readonly cursor: Schema.Int;
2561
+ readonly size: Schema.Int;
2562
+ readonly truncated: Schema.Boolean;
2563
+ }>>>, Schema.optionalKey<Schema.Struct<{
2564
+ readonly output: Schema.String;
2565
+ readonly cursor: Schema.Int;
2566
+ readonly size: Schema.Int;
2567
+ readonly truncated: Schema.Boolean;
2568
+ }>>, never, never>;
2569
+ readonly time: Schema.Struct<{
2570
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
2571
+ 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>;
2572
+ }>;
2573
+ }>, Schema.Struct<{
2574
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
2575
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
2576
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
2577
+ };
2578
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
2579
+ readonly type: Schema.tag<"assistant">;
2580
+ readonly agent: Schema.brand<Schema.String, "Agent.ID">;
2581
+ readonly model: Schema.Struct<{
2582
+ readonly id: Schema.brand<Schema.String, "Model.ID">;
2583
+ readonly providerID: Schema.brand<Schema.String, "Provider.ID"> & {
2584
+ opencode: string & import("effect/Brand").Brand<"Provider.ID">;
2585
+ anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
2586
+ openai: string & import("effect/Brand").Brand<"Provider.ID">;
2587
+ google: string & import("effect/Brand").Brand<"Provider.ID">;
2588
+ googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
2589
+ githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
2590
+ amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
2591
+ azure: string & import("effect/Brand").Brand<"Provider.ID">;
2592
+ openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
2593
+ mistral: string & import("effect/Brand").Brand<"Provider.ID">;
2594
+ gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
2595
+ };
2596
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
2597
+ }> & {
2598
+ parse: (input: string) => {
2599
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
2600
+ readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
2601
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
2602
+ };
2603
+ };
2604
+ readonly content: Schema.$Array<Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
2605
+ readonly type: Schema.tag<"text">;
2606
+ readonly text: Schema.String;
2607
+ readonly native: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
2608
+ }>, Schema.Struct<{
2609
+ readonly type: Schema.tag<"reasoning">;
2610
+ readonly text: Schema.String;
2611
+ readonly native: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
2612
+ readonly time: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2613
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
2614
+ 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>;
2615
+ }>>>, Schema.optionalKey<Schema.Struct<{
2616
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
2617
+ 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>;
2618
+ }>>, never, never>;
2619
+ }>, Schema.Struct<{
2620
+ readonly type: Schema.tag<"tool">;
2621
+ readonly id: Schema.String;
2622
+ readonly name: Schema.String;
2623
+ readonly executed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
2624
+ readonly native: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
2625
+ readonly state: Schema.toTaggedUnion<"status", readonly [Schema.Struct<{
2626
+ readonly status: Schema.tag<"streaming">;
2627
+ readonly input: Schema.String;
2628
+ }>, Schema.Struct<{
2629
+ readonly status: Schema.tag<"running">;
2630
+ readonly input: Schema.$Record<Schema.String, Schema.Unknown>;
2631
+ readonly metadata: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
2632
+ }>, Schema.Struct<{
2633
+ readonly status: Schema.tag<"completed">;
2634
+ readonly input: Schema.$Record<Schema.String, Schema.Unknown>;
2635
+ readonly content: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
2636
+ readonly type: Schema.Literal<"text">;
2637
+ readonly text: Schema.String;
2638
+ }>, Schema.Struct<{
2639
+ readonly type: Schema.Literal<"file">;
2640
+ readonly uri: Schema.String;
2641
+ readonly mime: Schema.String;
2642
+ readonly name: Schema.optional<Schema.String>;
2643
+ }>]>>;
2644
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>, never, never>;
2645
+ }>, Schema.Struct<{
2646
+ readonly status: Schema.tag<"error">;
2647
+ readonly input: Schema.$Record<Schema.String, Schema.Unknown>;
2648
+ readonly error: Schema.Struct<{
2649
+ readonly type: Schema.String;
2650
+ readonly message: Schema.String;
2651
+ readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
2652
+ readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2653
+ readonly body: Schema.String;
2654
+ }>>>, Schema.optionalKey<Schema.Struct<{
2655
+ readonly body: Schema.String;
2656
+ }>>, never, never>;
2657
+ readonly retryAfterMs: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
2658
+ }>;
2659
+ readonly content: Schema.decodeTo<Schema.optional<Schema.toType<Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
2660
+ readonly type: Schema.Literal<"text">;
2661
+ readonly text: Schema.String;
2662
+ }>, Schema.Struct<{
2663
+ readonly type: Schema.Literal<"file">;
2664
+ readonly uri: Schema.String;
2665
+ readonly mime: Schema.String;
2666
+ readonly name: Schema.optional<Schema.String>;
2667
+ }>]>>>>, Schema.optionalKey<Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
2668
+ readonly type: Schema.Literal<"text">;
2669
+ readonly text: Schema.String;
2670
+ }>, Schema.Struct<{
2671
+ readonly type: Schema.Literal<"file">;
2672
+ readonly uri: Schema.String;
2673
+ readonly mime: Schema.String;
2674
+ readonly name: Schema.optional<Schema.String>;
2675
+ }>]>>>, never, never>;
2676
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>, never, never>;
2677
+ }>]>;
2678
+ readonly time: Schema.Struct<{
2679
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
2680
+ readonly ran: 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>;
2681
+ 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>;
2682
+ }>;
2683
+ }>]>>;
2684
+ readonly snapshot: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2685
+ readonly start: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Snapshot.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Snapshot.ID">>, never, never>;
2686
+ readonly end: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Snapshot.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Snapshot.ID">>, never, never>;
2687
+ 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>;
2688
+ }>>>, Schema.optionalKey<Schema.Struct<{
2689
+ readonly start: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Snapshot.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Snapshot.ID">>, never, never>;
2690
+ readonly end: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Snapshot.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Snapshot.ID">>, never, never>;
2691
+ 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>;
2692
+ }>>, never, never>;
2693
+ readonly finish: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["stop", "length", "tool-calls", "content-filter", "error", "unknown"]>>>, Schema.optionalKey<Schema.Literals<readonly ["stop", "length", "tool-calls", "content-filter", "error", "unknown"]>>, never, never>;
2694
+ readonly rawFinish: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
2695
+ readonly native: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
2696
+ readonly cost: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.Finite, "Money.USD"> & {
2697
+ zero: number & import("effect/Brand").Brand<"Money.USD">;
2698
+ }>>, Schema.optionalKey<Schema.brand<Schema.Finite, "Money.USD"> & {
2699
+ zero: number & import("effect/Brand").Brand<"Money.USD">;
2700
+ }>, never, never>;
2701
+ readonly tokens: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2702
+ readonly input: Schema.Finite;
2703
+ readonly output: Schema.Finite;
2704
+ readonly reasoning: Schema.Finite;
2705
+ readonly cache: Schema.Struct<{
2706
+ readonly read: Schema.Finite;
2707
+ readonly write: Schema.Finite;
2708
+ }>;
2709
+ }>>>, Schema.optionalKey<Schema.Struct<{
2710
+ readonly input: Schema.Finite;
2711
+ readonly output: Schema.Finite;
2712
+ readonly reasoning: Schema.Finite;
2713
+ readonly cache: Schema.Struct<{
2714
+ readonly read: Schema.Finite;
2715
+ readonly write: Schema.Finite;
2716
+ }>;
2717
+ }>>, never, never>;
2718
+ readonly error: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2719
+ readonly type: Schema.String;
2720
+ readonly message: Schema.String;
2721
+ readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
2722
+ readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2723
+ readonly body: Schema.String;
2724
+ }>>>, Schema.optionalKey<Schema.Struct<{
2725
+ readonly body: Schema.String;
2726
+ }>>, never, never>;
2727
+ readonly retryAfterMs: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
2728
+ }>>>, Schema.optionalKey<Schema.Struct<{
2729
+ readonly type: Schema.String;
2730
+ readonly message: Schema.String;
2731
+ readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
2732
+ readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2733
+ readonly body: Schema.String;
2734
+ }>>>, Schema.optionalKey<Schema.Struct<{
2735
+ readonly body: Schema.String;
2736
+ }>>, never, never>;
2737
+ readonly retryAfterMs: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
2738
+ }>>, never, never>;
2739
+ readonly retry: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2740
+ readonly attempt: Schema.Int;
2741
+ readonly at: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
2742
+ readonly error: Schema.Struct<{
2743
+ readonly type: Schema.String;
2744
+ readonly message: Schema.String;
2745
+ readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
2746
+ readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2747
+ readonly body: Schema.String;
2748
+ }>>>, Schema.optionalKey<Schema.Struct<{
2749
+ readonly body: Schema.String;
2750
+ }>>, never, never>;
2751
+ readonly retryAfterMs: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
2752
+ }>;
2753
+ }>>>, Schema.optionalKey<Schema.Struct<{
2754
+ readonly attempt: Schema.Int;
2755
+ readonly at: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
2756
+ readonly error: Schema.Struct<{
2757
+ readonly type: Schema.String;
2758
+ readonly message: Schema.String;
2759
+ readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
2760
+ readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2761
+ readonly body: Schema.String;
2762
+ }>>>, Schema.optionalKey<Schema.Struct<{
2763
+ readonly body: Schema.String;
2764
+ }>>, never, never>;
2765
+ readonly retryAfterMs: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
2766
+ }>;
2767
+ }>>, never, never>;
2768
+ readonly time: Schema.Struct<{
2769
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
2770
+ 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>;
2771
+ 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>;
2772
+ }>;
2773
+ }>, Schema.Union<readonly [Schema.Struct<{
2774
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
2775
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
2776
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
2777
+ };
2778
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
2779
+ readonly time: Schema.Struct<{
2780
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
2781
+ }>;
2782
+ readonly type: Schema.tag<"compaction">;
2783
+ readonly status: Schema.tag<"running">;
2784
+ readonly reason: Schema.Literals<readonly ["auto", "manual"]>;
2785
+ readonly summary: Schema.String;
2786
+ }>, Schema.Struct<{
2787
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
2788
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
2789
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
2790
+ };
2791
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
2792
+ readonly time: Schema.Struct<{
2793
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
2794
+ }>;
2795
+ readonly type: Schema.tag<"compaction">;
2796
+ readonly cost: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.Finite, "Money.USD"> & {
2797
+ zero: number & import("effect/Brand").Brand<"Money.USD">;
2798
+ }>>, Schema.optionalKey<Schema.brand<Schema.Finite, "Money.USD"> & {
2799
+ zero: number & import("effect/Brand").Brand<"Money.USD">;
2800
+ }>, never, never>;
2801
+ readonly tokens: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2802
+ readonly input: Schema.Finite;
2803
+ readonly output: Schema.Finite;
2804
+ readonly reasoning: Schema.Finite;
2805
+ readonly cache: Schema.Struct<{
2806
+ readonly read: Schema.Finite;
2807
+ readonly write: Schema.Finite;
2808
+ }>;
2809
+ }>>>, Schema.optionalKey<Schema.Struct<{
2810
+ readonly input: Schema.Finite;
2811
+ readonly output: Schema.Finite;
2812
+ readonly reasoning: Schema.Finite;
2813
+ readonly cache: Schema.Struct<{
2814
+ readonly read: Schema.Finite;
2815
+ readonly write: Schema.Finite;
2816
+ }>;
2817
+ }>>, never, never>;
2818
+ readonly status: Schema.tag<"completed">;
2819
+ readonly reason: Schema.Literals<readonly ["auto", "manual"]>;
2820
+ readonly model: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2821
+ readonly id: Schema.brand<Schema.String, "Model.ID">;
2822
+ readonly providerID: Schema.brand<Schema.String, "Provider.ID"> & {
2823
+ opencode: string & import("effect/Brand").Brand<"Provider.ID">;
2824
+ anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
2825
+ openai: string & import("effect/Brand").Brand<"Provider.ID">;
2826
+ google: string & import("effect/Brand").Brand<"Provider.ID">;
2827
+ googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
2828
+ githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
2829
+ amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
2830
+ azure: string & import("effect/Brand").Brand<"Provider.ID">;
2831
+ openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
2832
+ mistral: string & import("effect/Brand").Brand<"Provider.ID">;
2833
+ gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
2834
+ };
2835
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
2836
+ }> & {
2837
+ parse: (input: string) => {
2838
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
2839
+ readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
2840
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
2841
+ };
2842
+ }>>, Schema.optionalKey<Schema.Struct<{
2843
+ readonly id: Schema.brand<Schema.String, "Model.ID">;
2844
+ readonly providerID: Schema.brand<Schema.String, "Provider.ID"> & {
2845
+ opencode: string & import("effect/Brand").Brand<"Provider.ID">;
2846
+ anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
2847
+ openai: string & import("effect/Brand").Brand<"Provider.ID">;
2848
+ google: string & import("effect/Brand").Brand<"Provider.ID">;
2849
+ googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
2850
+ githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
2851
+ amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
2852
+ azure: string & import("effect/Brand").Brand<"Provider.ID">;
2853
+ openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
2854
+ mistral: string & import("effect/Brand").Brand<"Provider.ID">;
2855
+ gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
2856
+ };
2857
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
2858
+ }> & {
2859
+ parse: (input: string) => {
2860
+ readonly id: string & import("effect/Brand").Brand<"Model.ID">;
2861
+ readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
2862
+ readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
2863
+ };
2864
+ }>, never, never>;
2865
+ readonly native: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
2866
+ readonly summary: Schema.String;
2867
+ }>, Schema.Struct<{
2868
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
2869
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
2870
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
2871
+ };
2872
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
2873
+ readonly time: Schema.Struct<{
2874
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
2875
+ }>;
2876
+ readonly type: Schema.tag<"compaction">;
2877
+ readonly cost: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.Finite, "Money.USD"> & {
2878
+ zero: number & import("effect/Brand").Brand<"Money.USD">;
2879
+ }>>, Schema.optionalKey<Schema.brand<Schema.Finite, "Money.USD"> & {
2880
+ zero: number & import("effect/Brand").Brand<"Money.USD">;
2881
+ }>, never, never>;
2882
+ readonly tokens: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2883
+ readonly input: Schema.Finite;
2884
+ readonly output: Schema.Finite;
2885
+ readonly reasoning: Schema.Finite;
2886
+ readonly cache: Schema.Struct<{
2887
+ readonly read: Schema.Finite;
2888
+ readonly write: Schema.Finite;
2889
+ }>;
2890
+ }>>>, Schema.optionalKey<Schema.Struct<{
2891
+ readonly input: Schema.Finite;
2892
+ readonly output: Schema.Finite;
2893
+ readonly reasoning: Schema.Finite;
2894
+ readonly cache: Schema.Struct<{
2895
+ readonly read: Schema.Finite;
2896
+ readonly write: Schema.Finite;
2897
+ }>;
2898
+ }>>, never, never>;
2899
+ readonly status: Schema.tag<"failed">;
2900
+ readonly reason: Schema.Literals<readonly ["auto", "manual"]>;
2901
+ readonly error: Schema.Struct<{
2902
+ readonly type: Schema.String;
2903
+ readonly message: Schema.String;
2904
+ readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
2905
+ readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2906
+ readonly body: Schema.String;
2907
+ }>>>, Schema.optionalKey<Schema.Struct<{
2908
+ readonly body: Schema.String;
2909
+ }>>, never, never>;
2910
+ readonly retryAfterMs: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
2911
+ }>;
2912
+ }>]>, Schema.Struct<{
2913
+ readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
2914
+ create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
2915
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
2916
+ };
2917
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
2918
+ readonly time: Schema.Struct<{
2919
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
2920
+ }>;
2921
+ readonly type: Schema.tag<"idle">;
2922
+ readonly outcome: Schema.Literals<readonly ["succeeded", "failed", "interrupted"]>;
2923
+ readonly error: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2924
+ readonly type: Schema.String;
2925
+ readonly message: Schema.String;
2926
+ readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
2927
+ readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2928
+ readonly body: Schema.String;
2929
+ }>>>, Schema.optionalKey<Schema.Struct<{
2930
+ readonly body: Schema.String;
2931
+ }>>, never, never>;
2932
+ readonly retryAfterMs: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
2933
+ }>>>, Schema.optionalKey<Schema.Struct<{
2934
+ readonly type: Schema.String;
2935
+ readonly message: Schema.String;
2936
+ readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
2937
+ readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
2938
+ readonly body: Schema.String;
2939
+ }>>>, Schema.optionalKey<Schema.Struct<{
2940
+ readonly body: Schema.String;
2941
+ }>>, never, never>;
2942
+ readonly retryAfterMs: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
2943
+ }>>, never, never>;
2944
+ }>]>;
2945
+ }>;
706
2946
  export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", HttpApiEndpoint.HttpApiEndpoint<"session.messages", "GET", "/api/session/:sessionID/message", Schema.toCodecStringTree<Schema.Struct<{
707
2947
  sessionID: Schema.brand<Schema.String, "SessionID"> & {
708
2948
  create: () => string & import("effect/Brand").Brand<"SessionID">;
709
- descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
710
2949
  };
711
2950
  }>>, Schema.toCodecStringTree<Schema.Struct<{
712
2951
  readonly limit: Schema.optional<Schema.NumberFromString>;
@@ -717,7 +2956,7 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
717
2956
  readonly data: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
718
2957
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
719
2958
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
720
- fromEvent: (eventID: import("@opencode/schema/event").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
2959
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
721
2960
  };
722
2961
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
723
2962
  readonly time: Schema.Struct<{
@@ -729,7 +2968,7 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
729
2968
  }>, Schema.Struct<{
730
2969
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
731
2970
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
732
- fromEvent: (eventID: import("@opencode/schema/event").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
2971
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
733
2972
  };
734
2973
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
735
2974
  readonly time: Schema.Struct<{
@@ -807,7 +3046,7 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
807
3046
  }>, Schema.Struct<{
808
3047
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
809
3048
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
810
- fromEvent: (eventID: import("@opencode/schema/event").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
3049
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
811
3050
  };
812
3051
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
813
3052
  readonly time: Schema.Struct<{
@@ -837,7 +3076,7 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
837
3076
  }>, Schema.Struct<{
838
3077
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
839
3078
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
840
- fromEvent: (eventID: import("@opencode/schema/event").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
3079
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
841
3080
  };
842
3081
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
843
3082
  readonly time: Schema.Struct<{
@@ -975,7 +3214,7 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
975
3214
  }>, Schema.Struct<{
976
3215
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
977
3216
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
978
- fromEvent: (eventID: import("@opencode/schema/event").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
3217
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
979
3218
  };
980
3219
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
981
3220
  readonly time: Schema.Struct<{
@@ -987,7 +3226,7 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
987
3226
  }>, Schema.Struct<{
988
3227
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
989
3228
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
990
- fromEvent: (eventID: import("@opencode/schema/event").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
3229
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
991
3230
  };
992
3231
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
993
3232
  readonly time: Schema.Struct<{
@@ -999,7 +3238,7 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
999
3238
  }>, Schema.Struct<{
1000
3239
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
1001
3240
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
1002
- fromEvent: (eventID: import("@opencode/schema/event").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
3241
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
1003
3242
  };
1004
3243
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1005
3244
  readonly time: Schema.Struct<{
@@ -1012,7 +3251,7 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
1012
3251
  }>, Schema.Struct<{
1013
3252
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
1014
3253
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
1015
- fromEvent: (eventID: import("@opencode/schema/event").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
3254
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
1016
3255
  };
1017
3256
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1018
3257
  readonly type: Schema.tag<"shell">;
@@ -1041,7 +3280,7 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
1041
3280
  }>, Schema.Struct<{
1042
3281
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
1043
3282
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
1044
- fromEvent: (eventID: import("@opencode/schema/event").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
3283
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
1045
3284
  };
1046
3285
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1047
3286
  readonly type: Schema.tag<"assistant">;
@@ -1241,7 +3480,7 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
1241
3480
  }>, Schema.Union<readonly [Schema.Struct<{
1242
3481
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
1243
3482
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
1244
- fromEvent: (eventID: import("@opencode/schema/event").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
3483
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
1245
3484
  };
1246
3485
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1247
3486
  readonly time: Schema.Struct<{
@@ -1254,7 +3493,7 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
1254
3493
  }>, Schema.Struct<{
1255
3494
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
1256
3495
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
1257
- fromEvent: (eventID: import("@opencode/schema/event").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
3496
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
1258
3497
  };
1259
3498
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1260
3499
  readonly time: Schema.Struct<{
@@ -1335,7 +3574,7 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
1335
3574
  }>, Schema.Struct<{
1336
3575
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
1337
3576
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
1338
- fromEvent: (eventID: import("@opencode/schema/event").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
3577
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
1339
3578
  };
1340
3579
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1341
3580
  readonly time: Schema.Struct<{
@@ -1380,7 +3619,7 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
1380
3619
  }>]>, Schema.Struct<{
1381
3620
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
1382
3621
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
1383
- fromEvent: (eventID: import("@opencode/schema/event").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
3622
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
1384
3623
  };
1385
3624
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1386
3625
  readonly time: Schema.Struct<{