@opencode/schema 0.0.0-dev-21269 → 0.0.0-dev-21289
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/credential-legacy.d.ts +54 -0
- package/dist/credential-legacy.js +19 -0
- package/dist/credential.d.ts +0 -4
- package/dist/credential.js +0 -2
- package/dist/event-manifest.d.ts +36 -274
- package/dist/event-manifest.js +1 -2
- package/dist/session-event.d.ts +114 -612
- package/dist/session-event.js +9 -12
- package/dist/session-legacy.d.ts +7 -0
- package/dist/session-legacy.js +118 -0
- package/dist/session-message.d.ts +31 -174
- package/dist/session-message.js +13 -12
- package/dist/session-transfer.d.ts +5 -55
- package/package.json +1 -1
- package/dist/session-compaction-event.d.ts +0 -87
- package/dist/session-compaction-event.js +0 -10
- package/dist/session-provider-context.d.ts +0 -54
- package/dist/session-provider-context.js +0 -17
package/dist/session-message.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export * as SessionMessage from "./session-message.js";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
|
-
import { SessionProviderContext } from "./session-provider-context.js";
|
|
4
3
|
import { optional } from "./schema.js";
|
|
5
4
|
import { Content } from "./tool.js";
|
|
6
5
|
import { Location } from "./location.js";
|
|
@@ -27,8 +26,12 @@ const Base = {
|
|
|
27
26
|
metadata: Schema.Record(Schema.String, Schema.Unknown).pipe(optional),
|
|
28
27
|
time: Schema.Struct({ created: DateTimeUtcFromMillis }),
|
|
29
28
|
};
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
/**
|
|
30
|
+
* Provider-owned replay data, keyed by the producing provider's metadata fields and echoed back verbatim. A tool's
|
|
31
|
+
* result data is merged into its call data, so adapters must not reuse a key with a different value across the two.
|
|
32
|
+
*/
|
|
33
|
+
export const Native = Schema.Record(Schema.String, Schema.Unknown).annotate({
|
|
34
|
+
identifier: "Session.Message.Native",
|
|
32
35
|
});
|
|
33
36
|
export const AgentSelected = Schema.Struct({
|
|
34
37
|
...Base,
|
|
@@ -124,8 +127,7 @@ export const AssistantTool = Schema.Struct({
|
|
|
124
127
|
id: Schema.String,
|
|
125
128
|
name: Schema.String,
|
|
126
129
|
executed: Schema.Boolean.pipe(optional),
|
|
127
|
-
|
|
128
|
-
providerResultState: ProviderState.pipe(optional),
|
|
130
|
+
native: Native.pipe(optional),
|
|
129
131
|
state: ToolState,
|
|
130
132
|
time: Schema.Struct({
|
|
131
133
|
created: DateTimeUtcFromMillis,
|
|
@@ -136,12 +138,12 @@ export const AssistantTool = Schema.Struct({
|
|
|
136
138
|
export const AssistantText = Schema.Struct({
|
|
137
139
|
type: Schema.tag("text"),
|
|
138
140
|
text: Schema.String,
|
|
139
|
-
|
|
141
|
+
native: Native.pipe(optional),
|
|
140
142
|
}).annotate({ identifier: "Session.Message.Assistant.Text" });
|
|
141
143
|
export const AssistantReasoning = Schema.Struct({
|
|
142
144
|
type: Schema.tag("reasoning"),
|
|
143
145
|
text: Schema.String,
|
|
144
|
-
|
|
146
|
+
native: Native.pipe(optional),
|
|
145
147
|
time: Schema.Struct({
|
|
146
148
|
created: DateTimeUtcFromMillis,
|
|
147
149
|
completed: DateTimeUtcFromMillis.pipe(optional),
|
|
@@ -169,7 +171,8 @@ export const Assistant = Schema.Struct({
|
|
|
169
171
|
}).pipe(optional),
|
|
170
172
|
finish: FinishReason.pipe(optional),
|
|
171
173
|
rawFinish: Schema.String.pipe(optional),
|
|
172
|
-
|
|
174
|
+
/** Step-level native data, such as a provider's reason for blocking a response. */
|
|
175
|
+
native: Native.pipe(optional),
|
|
173
176
|
cost: Money.USD.pipe(optional),
|
|
174
177
|
tokens: TokenUsage.Info.pipe(optional),
|
|
175
178
|
error: SessionError.Error.pipe(optional),
|
|
@@ -192,17 +195,15 @@ export const CompactionRunning = Schema.Struct({
|
|
|
192
195
|
status: Schema.tag("running"),
|
|
193
196
|
reason: Schema.Literals(["auto", "manual"]),
|
|
194
197
|
summary: Schema.String,
|
|
195
|
-
recent: Schema.String,
|
|
196
198
|
}).annotate({ identifier: "Session.Message.Compaction.Running" });
|
|
197
199
|
export const CompactionCompleted = Schema.Struct({
|
|
198
200
|
...CompactionBase,
|
|
199
201
|
status: Schema.tag("completed"),
|
|
200
202
|
reason: Schema.Literals(["auto", "manual"]),
|
|
201
203
|
model: Model.Ref.pipe(optional),
|
|
202
|
-
|
|
204
|
+
/** A provider compaction stores its replacement window in `native.messages`, replayed instead of `summary`. */
|
|
205
|
+
native: Native.pipe(optional),
|
|
203
206
|
summary: Schema.String,
|
|
204
|
-
recent: Schema.String,
|
|
205
|
-
providerContext: SessionProviderContext.Info.pipe(optional),
|
|
206
207
|
...CompactionUsage,
|
|
207
208
|
}).annotate({ identifier: "Session.Message.Compaction.Completed" });
|
|
208
209
|
export const CompactionFailed = Schema.Struct({
|
|
@@ -574,11 +574,11 @@ export declare const Data: Schema.Struct<{
|
|
|
574
574
|
readonly content: Schema.$Array<Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
|
|
575
575
|
readonly type: Schema.tag<"text">;
|
|
576
576
|
readonly text: Schema.String;
|
|
577
|
-
readonly
|
|
577
|
+
readonly native: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
578
578
|
}>, Schema.Struct<{
|
|
579
579
|
readonly type: Schema.tag<"reasoning">;
|
|
580
580
|
readonly text: Schema.String;
|
|
581
|
-
readonly
|
|
581
|
+
readonly native: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
582
582
|
readonly time: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
583
583
|
readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
584
584
|
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>;
|
|
@@ -591,8 +591,7 @@ export declare const Data: Schema.Struct<{
|
|
|
591
591
|
readonly id: Schema.String;
|
|
592
592
|
readonly name: Schema.String;
|
|
593
593
|
readonly executed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
594
|
-
readonly
|
|
595
|
-
readonly providerResultState: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
594
|
+
readonly native: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
596
595
|
readonly state: Schema.toTaggedUnion<"status", readonly [Schema.Struct<{
|
|
597
596
|
readonly status: Schema.tag<"streaming">;
|
|
598
597
|
readonly input: Schema.String;
|
|
@@ -662,7 +661,7 @@ export declare const Data: Schema.Struct<{
|
|
|
662
661
|
}>>, never, never>;
|
|
663
662
|
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>;
|
|
664
663
|
readonly rawFinish: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
665
|
-
readonly
|
|
664
|
+
readonly native: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
666
665
|
readonly cost: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.Finite, "Money.USD"> & {
|
|
667
666
|
zero: number & import("effect/Brand").Brand<"Money.USD">;
|
|
668
667
|
}>>, Schema.optionalKey<Schema.brand<Schema.Finite, "Money.USD"> & {
|
|
@@ -749,7 +748,6 @@ export declare const Data: Schema.Struct<{
|
|
|
749
748
|
readonly status: Schema.tag<"running">;
|
|
750
749
|
readonly reason: Schema.Literals<readonly ["auto", "manual"]>;
|
|
751
750
|
readonly summary: Schema.String;
|
|
752
|
-
readonly recent: Schema.String;
|
|
753
751
|
}>, Schema.Struct<{
|
|
754
752
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
755
753
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
@@ -829,56 +827,8 @@ export declare const Data: Schema.Struct<{
|
|
|
829
827
|
readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
|
|
830
828
|
};
|
|
831
829
|
}>, never, never>;
|
|
832
|
-
readonly
|
|
830
|
+
readonly native: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
833
831
|
readonly summary: Schema.String;
|
|
834
|
-
readonly recent: Schema.String;
|
|
835
|
-
readonly providerContext: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
836
|
-
readonly version: Schema.Literal<1>;
|
|
837
|
-
readonly provenance: Schema.Struct<{
|
|
838
|
-
readonly providerID: Schema.brand<Schema.String, "Provider.ID"> & {
|
|
839
|
-
opencode: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
840
|
-
anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
841
|
-
openai: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
842
|
-
google: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
843
|
-
googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
844
|
-
githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
845
|
-
amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
846
|
-
azure: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
847
|
-
openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
848
|
-
mistral: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
849
|
-
gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
850
|
-
};
|
|
851
|
-
readonly provider: Schema.String;
|
|
852
|
-
readonly modelID: Schema.String;
|
|
853
|
-
readonly route: Schema.String;
|
|
854
|
-
readonly protocol: Schema.String;
|
|
855
|
-
readonly endpoint: Schema.String;
|
|
856
|
-
}>;
|
|
857
|
-
readonly messages: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
858
|
-
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
859
|
-
readonly version: Schema.Literal<1>;
|
|
860
|
-
readonly provenance: Schema.Struct<{
|
|
861
|
-
readonly providerID: Schema.brand<Schema.String, "Provider.ID"> & {
|
|
862
|
-
opencode: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
863
|
-
anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
864
|
-
openai: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
865
|
-
google: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
866
|
-
googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
867
|
-
githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
868
|
-
amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
869
|
-
azure: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
870
|
-
openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
871
|
-
mistral: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
872
|
-
gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
873
|
-
};
|
|
874
|
-
readonly provider: Schema.String;
|
|
875
|
-
readonly modelID: Schema.String;
|
|
876
|
-
readonly route: Schema.String;
|
|
877
|
-
readonly protocol: Schema.String;
|
|
878
|
-
readonly endpoint: Schema.String;
|
|
879
|
-
}>;
|
|
880
|
-
readonly messages: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
881
|
-
}>>, never, never>;
|
|
882
832
|
}>, Schema.Struct<{
|
|
883
833
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
884
834
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
package/package.json
CHANGED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
export * as SessionCompactionEvent from "./session-compaction-event.js";
|
|
2
|
-
export declare const Compacted: import("effect/Schema").Struct<{
|
|
3
|
-
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Event.ID"> & {
|
|
4
|
-
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
5
|
-
};
|
|
6
|
-
readonly created: import("effect/Schema").Finite;
|
|
7
|
-
readonly metadata: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>>, import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>, never, never>;
|
|
8
|
-
readonly type: import("effect/Schema").Literal<"session.compacted">;
|
|
9
|
-
readonly location: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
|
|
10
|
-
readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
|
|
11
|
-
readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
|
|
12
|
-
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
13
|
-
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
14
|
-
}>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
|
|
15
|
-
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
16
|
-
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
17
|
-
}>, never, never>;
|
|
18
|
-
}>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
|
|
19
|
-
readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
|
|
20
|
-
readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
|
|
21
|
-
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
22
|
-
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
23
|
-
}>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
|
|
24
|
-
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
25
|
-
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
26
|
-
}>, never, never>;
|
|
27
|
-
}>>, never, never>;
|
|
28
|
-
readonly data: import("effect/Schema").Struct<{
|
|
29
|
-
readonly sessionID: import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
|
|
30
|
-
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
31
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
32
|
-
};
|
|
33
|
-
}>;
|
|
34
|
-
}> & {
|
|
35
|
-
type: "session.compacted";
|
|
36
|
-
durability: "ephemeral";
|
|
37
|
-
durable: undefined;
|
|
38
|
-
data: import("effect/Schema").Struct<{
|
|
39
|
-
readonly sessionID: import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
|
|
40
|
-
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
41
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
42
|
-
};
|
|
43
|
-
}>;
|
|
44
|
-
};
|
|
45
|
-
export declare const Definitions: readonly [import("effect/Schema").Struct<{
|
|
46
|
-
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Event.ID"> & {
|
|
47
|
-
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
48
|
-
};
|
|
49
|
-
readonly created: import("effect/Schema").Finite;
|
|
50
|
-
readonly metadata: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>>, import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>, never, never>;
|
|
51
|
-
readonly type: import("effect/Schema").Literal<"session.compacted">;
|
|
52
|
-
readonly location: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
|
|
53
|
-
readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
|
|
54
|
-
readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
|
|
55
|
-
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
56
|
-
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
57
|
-
}>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
|
|
58
|
-
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
59
|
-
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
60
|
-
}>, never, never>;
|
|
61
|
-
}>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
|
|
62
|
-
readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
|
|
63
|
-
readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
|
|
64
|
-
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
65
|
-
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
66
|
-
}>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
|
|
67
|
-
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
68
|
-
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
69
|
-
}>, never, never>;
|
|
70
|
-
}>>, never, never>;
|
|
71
|
-
readonly data: import("effect/Schema").Struct<{
|
|
72
|
-
readonly sessionID: import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
|
|
73
|
-
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
74
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
75
|
-
};
|
|
76
|
-
}>;
|
|
77
|
-
}> & {
|
|
78
|
-
type: "session.compacted";
|
|
79
|
-
durability: "ephemeral";
|
|
80
|
-
durable: undefined;
|
|
81
|
-
data: import("effect/Schema").Struct<{
|
|
82
|
-
readonly sessionID: import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
|
|
83
|
-
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
84
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
85
|
-
};
|
|
86
|
-
}>;
|
|
87
|
-
}];
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export * as SessionCompactionEvent from "./session-compaction-event.js";
|
|
2
|
-
import { Event } from "./event.js";
|
|
3
|
-
import { SessionID } from "./session-id.js";
|
|
4
|
-
export const Compacted = Event.ephemeral({
|
|
5
|
-
type: "session.compacted",
|
|
6
|
-
schema: {
|
|
7
|
-
sessionID: SessionID,
|
|
8
|
-
},
|
|
9
|
-
});
|
|
10
|
-
export const Definitions = Event.inventory(Compacted);
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
export * as SessionProviderContext from "./session-provider-context.js";
|
|
2
|
-
import { Schema } from "effect";
|
|
3
|
-
/** Exact producing model/deployment and route identity, never credentials or a connection ID. */
|
|
4
|
-
export interface Provenance extends Schema.Schema.Type<typeof Provenance> {
|
|
5
|
-
}
|
|
6
|
-
export declare const Provenance: Schema.Struct<{
|
|
7
|
-
readonly providerID: Schema.brand<Schema.String, "Provider.ID"> & {
|
|
8
|
-
opencode: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
9
|
-
anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
10
|
-
openai: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
11
|
-
google: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
12
|
-
googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
13
|
-
githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
14
|
-
amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
15
|
-
azure: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
16
|
-
openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
17
|
-
mistral: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
18
|
-
gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
19
|
-
};
|
|
20
|
-
readonly provider: Schema.String;
|
|
21
|
-
readonly modelID: Schema.String;
|
|
22
|
-
readonly route: Schema.String;
|
|
23
|
-
readonly protocol: Schema.String;
|
|
24
|
-
/** Digest of the configured endpoint; raw URLs and query values are not persisted. */
|
|
25
|
-
readonly endpoint: Schema.String;
|
|
26
|
-
}>;
|
|
27
|
-
/** Core validates the versioned canonical AI Message[] payload on installation and replay. */
|
|
28
|
-
export interface Info extends Schema.Schema.Type<typeof Info> {
|
|
29
|
-
}
|
|
30
|
-
export declare const Info: Schema.Struct<{
|
|
31
|
-
readonly version: Schema.Literal<1>;
|
|
32
|
-
readonly provenance: Schema.Struct<{
|
|
33
|
-
readonly providerID: Schema.brand<Schema.String, "Provider.ID"> & {
|
|
34
|
-
opencode: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
35
|
-
anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
36
|
-
openai: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
37
|
-
google: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
38
|
-
googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
39
|
-
githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
40
|
-
amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
41
|
-
azure: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
42
|
-
openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
43
|
-
mistral: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
44
|
-
gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
45
|
-
};
|
|
46
|
-
readonly provider: Schema.String;
|
|
47
|
-
readonly modelID: Schema.String;
|
|
48
|
-
readonly route: Schema.String;
|
|
49
|
-
readonly protocol: Schema.String;
|
|
50
|
-
/** Digest of the configured endpoint; raw URLs and query values are not persisted. */
|
|
51
|
-
readonly endpoint: Schema.String;
|
|
52
|
-
}>;
|
|
53
|
-
readonly messages: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
54
|
-
}>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export * as SessionProviderContext from "./session-provider-context.js";
|
|
2
|
-
import { Schema } from "effect";
|
|
3
|
-
import { Provider } from "./provider.js";
|
|
4
|
-
export const Provenance = Schema.Struct({
|
|
5
|
-
providerID: Provider.ID,
|
|
6
|
-
provider: Schema.String,
|
|
7
|
-
modelID: Schema.String,
|
|
8
|
-
route: Schema.String,
|
|
9
|
-
protocol: Schema.String,
|
|
10
|
-
/** Digest of the configured endpoint; raw URLs and query values are not persisted. */
|
|
11
|
-
endpoint: Schema.String,
|
|
12
|
-
}).annotate({ identifier: "Session.ProviderContext.Provenance" });
|
|
13
|
-
export const Info = Schema.Struct({
|
|
14
|
-
version: Schema.Literal(1),
|
|
15
|
-
provenance: Provenance,
|
|
16
|
-
messages: Schema.Json,
|
|
17
|
-
}).annotate({ identifier: "Session.ProviderContext" });
|