@opencode/schema 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.
- package/dist/agent.d.ts +5 -0
- package/dist/config/experimental.d.ts +2 -0
- package/dist/config/experimental.js +6 -0
- package/dist/config/provider.d.ts +73 -7
- package/dist/config/provider.js +10 -15
- package/dist/event-manifest.d.ts +128 -366
- package/dist/file-diff.d.ts +2 -0
- package/dist/file-diff.js +2 -0
- package/dist/generate.d.ts +355 -0
- package/dist/generate.js +134 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp.d.ts +1 -0
- package/dist/mcp.js +2 -0
- package/dist/model-compatibility.d.ts +15 -4
- package/dist/model-compatibility.js +15 -4
- package/dist/model.d.ts +53 -2
- package/dist/model.js +9 -7
- package/dist/permission.d.ts +0 -9
- package/dist/persistent-pty.d.ts +0 -20
- package/dist/plugin.d.ts +15 -0
- package/dist/plugin.js +11 -1
- package/dist/prompt-input.d.ts +3 -36
- package/dist/prompt-input.js +2 -6
- package/dist/prompt.d.ts +96 -0
- package/dist/prompt.js +17 -1
- package/dist/provider.d.ts +40 -0
- package/dist/provider.js +14 -3
- package/dist/session-event.d.ts +320 -852
- package/dist/session-event.js +0 -7
- package/dist/session-fork.d.ts +2 -2
- package/dist/session-id.d.ts +0 -1
- package/dist/session-id.js +3 -7
- package/dist/session-inbox.d.ts +721 -101
- package/dist/session-inbox.js +10 -1
- package/dist/session-message.d.ts +998 -31
- package/dist/session-message.js +19 -2
- package/dist/session-revert.d.ts +64 -27
- package/dist/session-status-event.d.ts +0 -8
- package/dist/session-transfer.d.ts +23 -24
- package/dist/session.d.ts +12 -22
- package/dist/usage-limits.d.ts +227 -0
- package/dist/usage-limits.js +59 -0
- package/dist/v1/legacy-event.d.ts +0 -4
- package/dist/v1/permission.d.ts +0 -10
- package/dist/v1/session.d.ts +0 -177
- package/dist/vcs.d.ts +3 -0
- package/dist/vcs.js +2 -0
- package/dist/workspace-id.js +0 -2
- package/package.json +5 -3
|
@@ -6,49 +6,44 @@ export declare const Data: Schema.Struct<{
|
|
|
6
6
|
readonly info: Schema.Struct<{
|
|
7
7
|
readonly id: Schema.brand<Schema.String, "SessionID"> & {
|
|
8
8
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
9
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
10
9
|
};
|
|
11
10
|
readonly parentID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "SessionID"> & {
|
|
12
11
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
13
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
14
12
|
}>>, Schema.optionalKey<Schema.brand<Schema.String, "SessionID"> & {
|
|
15
13
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
16
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
17
14
|
}>, never, never>;
|
|
18
15
|
readonly fork: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
19
16
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
20
17
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
21
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
22
18
|
};
|
|
23
19
|
readonly boundary: Schema.Union<readonly [Schema.Struct<{
|
|
24
20
|
readonly type: Schema.Literal<"before">;
|
|
25
21
|
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
26
22
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
27
|
-
fromEvent: (eventID:
|
|
23
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
28
24
|
};
|
|
29
25
|
}>, Schema.Struct<{
|
|
30
26
|
readonly type: Schema.Literal<"through">;
|
|
31
27
|
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
32
28
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
33
|
-
fromEvent: (eventID:
|
|
29
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
34
30
|
};
|
|
35
31
|
}>]>;
|
|
36
32
|
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
37
33
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
38
34
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
39
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
40
35
|
};
|
|
41
36
|
readonly boundary: Schema.Union<readonly [Schema.Struct<{
|
|
42
37
|
readonly type: Schema.Literal<"before">;
|
|
43
38
|
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
44
39
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
45
|
-
fromEvent: (eventID:
|
|
40
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
46
41
|
};
|
|
47
42
|
}>, Schema.Struct<{
|
|
48
43
|
readonly type: Schema.Literal<"through">;
|
|
49
44
|
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
50
45
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
51
|
-
fromEvent: (eventID:
|
|
46
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
52
47
|
};
|
|
53
48
|
}>]>;
|
|
54
49
|
}>>, never, never>;
|
|
@@ -146,7 +141,7 @@ export declare const Data: Schema.Struct<{
|
|
|
146
141
|
readonly revert: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
147
142
|
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
148
143
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
149
|
-
fromEvent: (eventID:
|
|
144
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
150
145
|
};
|
|
151
146
|
readonly partID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
152
147
|
readonly snapshot: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Snapshot.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Snapshot.ID">>, never, never>;
|
|
@@ -156,17 +151,19 @@ export declare const Data: Schema.Struct<{
|
|
|
156
151
|
readonly additions: Schema.Int;
|
|
157
152
|
readonly deletions: Schema.Int;
|
|
158
153
|
readonly status: Schema.Literals<readonly ["added", "deleted", "modified"]>;
|
|
154
|
+
readonly more: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
|
|
159
155
|
}>>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
160
156
|
readonly file: Schema.String;
|
|
161
157
|
readonly patch: Schema.String;
|
|
162
158
|
readonly additions: Schema.Int;
|
|
163
159
|
readonly deletions: Schema.Int;
|
|
164
160
|
readonly status: Schema.Literals<readonly ["added", "deleted", "modified"]>;
|
|
161
|
+
readonly more: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
|
|
165
162
|
}>>>, never, never>;
|
|
166
163
|
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
167
164
|
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
168
165
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
169
|
-
fromEvent: (eventID:
|
|
166
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
170
167
|
};
|
|
171
168
|
readonly partID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
172
169
|
readonly snapshot: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Snapshot.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Snapshot.ID">>, never, never>;
|
|
@@ -176,19 +173,21 @@ export declare const Data: Schema.Struct<{
|
|
|
176
173
|
readonly additions: Schema.Int;
|
|
177
174
|
readonly deletions: Schema.Int;
|
|
178
175
|
readonly status: Schema.Literals<readonly ["added", "deleted", "modified"]>;
|
|
176
|
+
readonly more: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
|
|
179
177
|
}>>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
180
178
|
readonly file: Schema.String;
|
|
181
179
|
readonly patch: Schema.String;
|
|
182
180
|
readonly additions: Schema.Int;
|
|
183
181
|
readonly deletions: Schema.Int;
|
|
184
182
|
readonly status: Schema.Literals<readonly ["added", "deleted", "modified"]>;
|
|
183
|
+
readonly more: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
|
|
185
184
|
}>>>, never, never>;
|
|
186
185
|
}>>, never, never>;
|
|
187
186
|
}>;
|
|
188
187
|
readonly messages: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
189
188
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
190
189
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
191
|
-
fromEvent: (eventID:
|
|
190
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
192
191
|
};
|
|
193
192
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
194
193
|
readonly time: Schema.Struct<{
|
|
@@ -200,7 +199,7 @@ export declare const Data: Schema.Struct<{
|
|
|
200
199
|
}>, Schema.Struct<{
|
|
201
200
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
202
201
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
203
|
-
fromEvent: (eventID:
|
|
202
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
204
203
|
};
|
|
205
204
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
206
205
|
readonly time: Schema.Struct<{
|
|
@@ -278,7 +277,7 @@ export declare const Data: Schema.Struct<{
|
|
|
278
277
|
}>, Schema.Struct<{
|
|
279
278
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
280
279
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
281
|
-
fromEvent: (eventID:
|
|
280
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
282
281
|
};
|
|
283
282
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
284
283
|
readonly time: Schema.Struct<{
|
|
@@ -339,7 +338,7 @@ export declare const Data: Schema.Struct<{
|
|
|
339
338
|
}>, Schema.Struct<{
|
|
340
339
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
341
340
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
342
|
-
fromEvent: (eventID:
|
|
341
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
343
342
|
};
|
|
344
343
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
345
344
|
readonly time: Schema.Struct<{
|
|
@@ -477,7 +476,7 @@ export declare const Data: Schema.Struct<{
|
|
|
477
476
|
}>, Schema.Struct<{
|
|
478
477
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
479
478
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
480
|
-
fromEvent: (eventID:
|
|
479
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
481
480
|
};
|
|
482
481
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
483
482
|
readonly time: Schema.Struct<{
|
|
@@ -489,7 +488,7 @@ export declare const Data: Schema.Struct<{
|
|
|
489
488
|
}>, Schema.Struct<{
|
|
490
489
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
491
490
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
492
|
-
fromEvent: (eventID:
|
|
491
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
493
492
|
};
|
|
494
493
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
495
494
|
readonly time: Schema.Struct<{
|
|
@@ -501,7 +500,7 @@ export declare const Data: Schema.Struct<{
|
|
|
501
500
|
}>, Schema.Struct<{
|
|
502
501
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
503
502
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
504
|
-
fromEvent: (eventID:
|
|
503
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
505
504
|
};
|
|
506
505
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
507
506
|
readonly time: Schema.Struct<{
|
|
@@ -514,7 +513,7 @@ export declare const Data: Schema.Struct<{
|
|
|
514
513
|
}>, Schema.Struct<{
|
|
515
514
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
516
515
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
517
|
-
fromEvent: (eventID:
|
|
516
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
518
517
|
};
|
|
519
518
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
520
519
|
readonly type: Schema.tag<"shell">;
|
|
@@ -543,7 +542,7 @@ export declare const Data: Schema.Struct<{
|
|
|
543
542
|
}>, Schema.Struct<{
|
|
544
543
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
545
544
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
546
|
-
fromEvent: (eventID:
|
|
545
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
547
546
|
};
|
|
548
547
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
549
548
|
readonly type: Schema.tag<"assistant">;
|
|
@@ -743,7 +742,7 @@ export declare const Data: Schema.Struct<{
|
|
|
743
742
|
}>, Schema.Union<readonly [Schema.Struct<{
|
|
744
743
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
745
744
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
746
|
-
fromEvent: (eventID:
|
|
745
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
747
746
|
};
|
|
748
747
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
749
748
|
readonly time: Schema.Struct<{
|
|
@@ -756,7 +755,7 @@ export declare const Data: Schema.Struct<{
|
|
|
756
755
|
}>, Schema.Struct<{
|
|
757
756
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
758
757
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
759
|
-
fromEvent: (eventID:
|
|
758
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
760
759
|
};
|
|
761
760
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
762
761
|
readonly time: Schema.Struct<{
|
|
@@ -837,7 +836,7 @@ export declare const Data: Schema.Struct<{
|
|
|
837
836
|
}>, Schema.Struct<{
|
|
838
837
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
839
838
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
840
|
-
fromEvent: (eventID:
|
|
839
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
841
840
|
};
|
|
842
841
|
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
842
|
readonly time: Schema.Struct<{
|
|
@@ -882,7 +881,7 @@ export declare const Data: Schema.Struct<{
|
|
|
882
881
|
}>]>, Schema.Struct<{
|
|
883
882
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
884
883
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
885
|
-
fromEvent: (eventID:
|
|
884
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
886
885
|
};
|
|
887
886
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
888
887
|
readonly time: Schema.Struct<{
|
package/dist/session.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ import { Revert } from "./session-revert.js";
|
|
|
7
7
|
import { SessionFork } from "./session-fork.js";
|
|
8
8
|
export declare const ID: Schema.brand<Schema.String, "SessionID"> & {
|
|
9
9
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
10
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
11
10
|
};
|
|
12
11
|
export type ID = SessionID;
|
|
13
12
|
export declare const Metadata: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
@@ -18,13 +17,13 @@ export declare const ForkBoundary: Schema.Union<readonly [Schema.Struct<{
|
|
|
18
17
|
readonly type: Schema.Literal<"before">;
|
|
19
18
|
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
20
19
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
21
|
-
fromEvent: (eventID:
|
|
20
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
22
21
|
};
|
|
23
22
|
}>, Schema.Struct<{
|
|
24
23
|
readonly type: Schema.Literal<"through">;
|
|
25
24
|
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
26
25
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
27
|
-
fromEvent: (eventID:
|
|
26
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
28
27
|
};
|
|
29
28
|
}>]>;
|
|
30
29
|
export type ForkBoundary = SessionFork.Boundary;
|
|
@@ -33,49 +32,44 @@ export interface Info extends Schema.Schema.Type<typeof Info> {
|
|
|
33
32
|
export declare const Info: Schema.Struct<{
|
|
34
33
|
readonly id: Schema.brand<Schema.String, "SessionID"> & {
|
|
35
34
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
36
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
37
35
|
};
|
|
38
36
|
readonly parentID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "SessionID"> & {
|
|
39
37
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
40
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
41
38
|
}>>, Schema.optionalKey<Schema.brand<Schema.String, "SessionID"> & {
|
|
42
39
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
43
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
44
40
|
}>, never, never>;
|
|
45
41
|
readonly fork: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
46
42
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
47
43
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
48
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
49
44
|
};
|
|
50
45
|
readonly boundary: Schema.Union<readonly [Schema.Struct<{
|
|
51
46
|
readonly type: Schema.Literal<"before">;
|
|
52
47
|
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
53
48
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
54
|
-
fromEvent: (eventID:
|
|
49
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
55
50
|
};
|
|
56
51
|
}>, Schema.Struct<{
|
|
57
52
|
readonly type: Schema.Literal<"through">;
|
|
58
53
|
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
59
54
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
60
|
-
fromEvent: (eventID:
|
|
55
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
61
56
|
};
|
|
62
57
|
}>]>;
|
|
63
58
|
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
64
59
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
65
60
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
66
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
67
61
|
};
|
|
68
62
|
readonly boundary: Schema.Union<readonly [Schema.Struct<{
|
|
69
63
|
readonly type: Schema.Literal<"before">;
|
|
70
64
|
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
71
65
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
72
|
-
fromEvent: (eventID:
|
|
66
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
73
67
|
};
|
|
74
68
|
}>, Schema.Struct<{
|
|
75
69
|
readonly type: Schema.Literal<"through">;
|
|
76
70
|
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
77
71
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
78
|
-
fromEvent: (eventID:
|
|
72
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
79
73
|
};
|
|
80
74
|
}>]>;
|
|
81
75
|
}>>, never, never>;
|
|
@@ -175,7 +169,7 @@ export declare const Info: Schema.Struct<{
|
|
|
175
169
|
readonly revert: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
176
170
|
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
177
171
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
178
|
-
fromEvent: (eventID:
|
|
172
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
179
173
|
};
|
|
180
174
|
readonly partID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
181
175
|
readonly snapshot: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Snapshot.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Snapshot.ID">>, never, never>;
|
|
@@ -185,17 +179,19 @@ export declare const Info: Schema.Struct<{
|
|
|
185
179
|
readonly additions: Schema.Int;
|
|
186
180
|
readonly deletions: Schema.Int;
|
|
187
181
|
readonly status: Schema.Literals<readonly ["added", "deleted", "modified"]>;
|
|
182
|
+
readonly more: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
|
|
188
183
|
}>>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
189
184
|
readonly file: Schema.String;
|
|
190
185
|
readonly patch: Schema.String;
|
|
191
186
|
readonly additions: Schema.Int;
|
|
192
187
|
readonly deletions: Schema.Int;
|
|
193
188
|
readonly status: Schema.Literals<readonly ["added", "deleted", "modified"]>;
|
|
189
|
+
readonly more: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
|
|
194
190
|
}>>>, never, never>;
|
|
195
191
|
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
196
192
|
readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
197
193
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
198
|
-
fromEvent: (eventID:
|
|
194
|
+
fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
199
195
|
};
|
|
200
196
|
readonly partID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
201
197
|
readonly snapshot: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Snapshot.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Snapshot.ID">>, never, never>;
|
|
@@ -205,19 +201,20 @@ export declare const Info: Schema.Struct<{
|
|
|
205
201
|
readonly additions: Schema.Int;
|
|
206
202
|
readonly deletions: Schema.Int;
|
|
207
203
|
readonly status: Schema.Literals<readonly ["added", "deleted", "modified"]>;
|
|
204
|
+
readonly more: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
|
|
208
205
|
}>>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
209
206
|
readonly file: Schema.String;
|
|
210
207
|
readonly patch: Schema.String;
|
|
211
208
|
readonly additions: Schema.Int;
|
|
212
209
|
readonly deletions: Schema.Int;
|
|
213
210
|
readonly status: Schema.Literals<readonly ["added", "deleted", "modified"]>;
|
|
211
|
+
readonly more: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
|
|
214
212
|
}>>>, never, never>;
|
|
215
213
|
}>>, never, never>;
|
|
216
214
|
}>;
|
|
217
215
|
export declare const ListAnchor: Schema.Struct<{
|
|
218
216
|
readonly id: Schema.brand<Schema.String, "SessionID"> & {
|
|
219
217
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
220
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
221
218
|
};
|
|
222
219
|
readonly time: Schema.Finite;
|
|
223
220
|
readonly direction: Schema.Literals<readonly ["previous", "next"]>;
|
|
@@ -229,7 +226,6 @@ export declare const ListFilter: Schema.Struct<{
|
|
|
229
226
|
readonly search: Schema.optional<Schema.String>;
|
|
230
227
|
readonly parentID: Schema.optional<Schema.Union<readonly [Schema.brand<Schema.String, "SessionID"> & {
|
|
231
228
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
232
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
233
229
|
}, Schema.decodeTo<Schema.Null, Schema.Literal<"null">, never, never>]>>;
|
|
234
230
|
readonly archived: Schema.optional<Schema.decodeTo<Schema.Boolean, Schema.Literals<readonly ["true", "false"]>, never, never>>;
|
|
235
231
|
readonly directory: Schema.optional<Schema.brand<Schema.String, "AbsolutePath">>;
|
|
@@ -245,14 +241,12 @@ declare const ListCursorInput: Schema.Union<readonly [Schema.Struct<{
|
|
|
245
241
|
readonly search: Schema.optional<Schema.String>;
|
|
246
242
|
readonly parentID: Schema.optional<Schema.Union<readonly [Schema.brand<Schema.String, "SessionID"> & {
|
|
247
243
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
248
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
249
244
|
}, Schema.decodeTo<Schema.Null, Schema.Literal<"null">, never, never>]>>;
|
|
250
245
|
readonly archived: Schema.optional<Schema.decodeTo<Schema.Boolean, Schema.Literals<readonly ["true", "false"]>, never, never>>;
|
|
251
246
|
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
252
247
|
readonly anchor: Schema.Struct<{
|
|
253
248
|
readonly id: Schema.brand<Schema.String, "SessionID"> & {
|
|
254
249
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
255
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
256
250
|
};
|
|
257
251
|
readonly time: Schema.Finite;
|
|
258
252
|
readonly direction: Schema.Literals<readonly ["previous", "next"]>;
|
|
@@ -262,7 +256,6 @@ declare const ListCursorInput: Schema.Union<readonly [Schema.Struct<{
|
|
|
262
256
|
readonly search: Schema.optional<Schema.String>;
|
|
263
257
|
readonly parentID: Schema.optional<Schema.Union<readonly [Schema.brand<Schema.String, "SessionID"> & {
|
|
264
258
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
265
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
266
259
|
}, Schema.decodeTo<Schema.Null, Schema.Literal<"null">, never, never>]>>;
|
|
267
260
|
readonly archived: Schema.optional<Schema.decodeTo<Schema.Boolean, Schema.Literals<readonly ["true", "false"]>, never, never>>;
|
|
268
261
|
readonly project: Schema.brand<Schema.String, "Project.ID"> & {
|
|
@@ -272,7 +265,6 @@ declare const ListCursorInput: Schema.Union<readonly [Schema.Struct<{
|
|
|
272
265
|
readonly anchor: Schema.Struct<{
|
|
273
266
|
readonly id: Schema.brand<Schema.String, "SessionID"> & {
|
|
274
267
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
275
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
276
268
|
};
|
|
277
269
|
readonly time: Schema.Finite;
|
|
278
270
|
readonly direction: Schema.Literals<readonly ["previous", "next"]>;
|
|
@@ -282,13 +274,11 @@ declare const ListCursorInput: Schema.Union<readonly [Schema.Struct<{
|
|
|
282
274
|
readonly search: Schema.optional<Schema.String>;
|
|
283
275
|
readonly parentID: Schema.optional<Schema.Union<readonly [Schema.brand<Schema.String, "SessionID"> & {
|
|
284
276
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
285
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
286
277
|
}, Schema.decodeTo<Schema.Null, Schema.Literal<"null">, never, never>]>>;
|
|
287
278
|
readonly archived: Schema.optional<Schema.decodeTo<Schema.Boolean, Schema.Literals<readonly ["true", "false"]>, never, never>>;
|
|
288
279
|
readonly anchor: Schema.Struct<{
|
|
289
280
|
readonly id: Schema.brand<Schema.String, "SessionID"> & {
|
|
290
281
|
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
291
|
-
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
|
|
292
282
|
};
|
|
293
283
|
readonly time: Schema.Finite;
|
|
294
284
|
readonly direction: Schema.Literals<readonly ["previous", "next"]>;
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
export * as UsageLimits from "./usage-limits.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
/** One window of the OpenCode Go allowance. */
|
|
4
|
+
export interface Meter extends Schema.Schema.Type<typeof Meter> {
|
|
5
|
+
}
|
|
6
|
+
export declare const Meter: Schema.Struct<{
|
|
7
|
+
/** How much of the window's allowance is used. */
|
|
8
|
+
readonly percent: Schema.Finite;
|
|
9
|
+
/** Go refuses requests until the window resets. */
|
|
10
|
+
readonly limited: Schema.Boolean;
|
|
11
|
+
readonly resetsAt: Schema.Finite;
|
|
12
|
+
}>;
|
|
13
|
+
/** The OpenCode Go allowance of a workspace the member subscribes to Go in. */
|
|
14
|
+
export interface Go extends Schema.Schema.Type<typeof Go> {
|
|
15
|
+
}
|
|
16
|
+
export declare const Go: Schema.Struct<{
|
|
17
|
+
readonly rolling: Schema.Struct<{
|
|
18
|
+
/** How much of the window's allowance is used. */
|
|
19
|
+
readonly percent: Schema.Finite;
|
|
20
|
+
/** Go refuses requests until the window resets. */
|
|
21
|
+
readonly limited: Schema.Boolean;
|
|
22
|
+
readonly resetsAt: Schema.Finite;
|
|
23
|
+
}>;
|
|
24
|
+
readonly weekly: Schema.Struct<{
|
|
25
|
+
/** How much of the window's allowance is used. */
|
|
26
|
+
readonly percent: Schema.Finite;
|
|
27
|
+
/** Go refuses requests until the window resets. */
|
|
28
|
+
readonly limited: Schema.Boolean;
|
|
29
|
+
readonly resetsAt: Schema.Finite;
|
|
30
|
+
}>;
|
|
31
|
+
readonly monthly: Schema.Struct<{
|
|
32
|
+
/** How much of the window's allowance is used. */
|
|
33
|
+
readonly percent: Schema.Finite;
|
|
34
|
+
/** Go refuses requests until the window resets. */
|
|
35
|
+
readonly limited: Schema.Boolean;
|
|
36
|
+
readonly resetsAt: Schema.Finite;
|
|
37
|
+
}>;
|
|
38
|
+
}>;
|
|
39
|
+
/** A model a budget covers, by the IDs OpenCode knows it by. */
|
|
40
|
+
export interface BudgetModel extends Schema.Schema.Type<typeof BudgetModel> {
|
|
41
|
+
}
|
|
42
|
+
export declare const BudgetModel: Schema.Struct<{
|
|
43
|
+
readonly providerID: Schema.brand<Schema.String, "Provider.ID"> & {
|
|
44
|
+
opencode: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
45
|
+
anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
46
|
+
openai: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
47
|
+
google: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
48
|
+
googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
49
|
+
githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
50
|
+
amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
51
|
+
azure: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
52
|
+
openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
53
|
+
mistral: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
54
|
+
gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
55
|
+
};
|
|
56
|
+
readonly modelID: Schema.brand<Schema.String, "Model.ID">;
|
|
57
|
+
readonly name: Schema.String;
|
|
58
|
+
/** What a per-model budget's member has spent on this model this month. */
|
|
59
|
+
readonly spent: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.Finite, "Money.USD"> & {
|
|
60
|
+
zero: number & import("effect/Brand").Brand<"Money.USD">;
|
|
61
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.Finite, "Money.USD"> & {
|
|
62
|
+
zero: number & import("effect/Brand").Brand<"Money.USD">;
|
|
63
|
+
}>, never, never>;
|
|
64
|
+
}>;
|
|
65
|
+
/** A monthly spend limit the OpenCode Console workspace sets on the member. */
|
|
66
|
+
export interface Budget extends Schema.Schema.Type<typeof Budget> {
|
|
67
|
+
}
|
|
68
|
+
export declare const Budget: Schema.Struct<{
|
|
69
|
+
readonly id: Schema.String;
|
|
70
|
+
readonly limit: Schema.brand<Schema.Finite, "Money.USD"> & {
|
|
71
|
+
zero: number & import("effect/Brand").Brand<"Money.USD">;
|
|
72
|
+
};
|
|
73
|
+
/** The member's spend this month, or the pooled spend of a combined budget; per model, the most on one model. */
|
|
74
|
+
readonly spent: Schema.brand<Schema.Finite, "Money.USD"> & {
|
|
75
|
+
zero: number & import("effect/Brand").Brand<"Money.USD">;
|
|
76
|
+
};
|
|
77
|
+
/** `each` limits every member separately; `combined` pools everyone's spend against one limit. */
|
|
78
|
+
readonly scope: Schema.Literals<readonly ["each", "combined"]>;
|
|
79
|
+
/** `set` counts spend across the budget's models; `model` limits each model separately. */
|
|
80
|
+
readonly per: Schema.Literals<readonly ["set", "model"]>;
|
|
81
|
+
/** `all` covers every model and billable service; `models` covers only `models`. */
|
|
82
|
+
readonly coverage: Schema.Literals<readonly ["all", "models"]>;
|
|
83
|
+
readonly models: Schema.$Array<Schema.Struct<{
|
|
84
|
+
readonly providerID: Schema.brand<Schema.String, "Provider.ID"> & {
|
|
85
|
+
opencode: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
86
|
+
anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
87
|
+
openai: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
88
|
+
google: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
89
|
+
googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
90
|
+
githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
91
|
+
amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
92
|
+
azure: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
93
|
+
openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
94
|
+
mistral: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
95
|
+
gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
96
|
+
};
|
|
97
|
+
readonly modelID: Schema.brand<Schema.String, "Model.ID">;
|
|
98
|
+
readonly name: Schema.String;
|
|
99
|
+
/** What a per-model budget's member has spent on this model this month. */
|
|
100
|
+
readonly spent: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.Finite, "Money.USD"> & {
|
|
101
|
+
zero: number & import("effect/Brand").Brand<"Money.USD">;
|
|
102
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.Finite, "Money.USD"> & {
|
|
103
|
+
zero: number & import("effect/Brand").Brand<"Money.USD">;
|
|
104
|
+
}>, never, never>;
|
|
105
|
+
}>>;
|
|
106
|
+
/** The vendors whose models the budget counts, by name; empty when it doesn't count by vendor. */
|
|
107
|
+
readonly vendors: Schema.$Array<Schema.String>;
|
|
108
|
+
/** The input price per 1M tokens from which the budget counts a model, when it sets one. */
|
|
109
|
+
readonly inputPriceAtLeast: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.Finite, "Money.USDPerMillionTokens"> & {
|
|
110
|
+
zero: number & import("effect/Brand").Brand<"Money.USDPerMillionTokens">;
|
|
111
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.Finite, "Money.USDPerMillionTokens"> & {
|
|
112
|
+
zero: number & import("effect/Brand").Brand<"Money.USDPerMillionTokens">;
|
|
113
|
+
}>, never, never>;
|
|
114
|
+
/** The budget counts models picked one by one, rather than by vendor or price. */
|
|
115
|
+
readonly picked: Schema.Boolean;
|
|
116
|
+
/** Everyone in the workspace pools spend against it, so reaching it pauses model use for all of them. */
|
|
117
|
+
readonly shared: Schema.Boolean;
|
|
118
|
+
readonly resetsAt: Schema.Finite;
|
|
119
|
+
}>;
|
|
120
|
+
/** The usage limits of the OpenCode Console workspace a location is signed in to. */
|
|
121
|
+
export interface Info extends Schema.Schema.Type<typeof Info> {
|
|
122
|
+
}
|
|
123
|
+
export declare const Info: Schema.Struct<{
|
|
124
|
+
readonly workspace: Schema.Struct<{
|
|
125
|
+
readonly id: Schema.String;
|
|
126
|
+
readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
127
|
+
/** The member's usage page in OpenCode Console. */
|
|
128
|
+
readonly usageURL: Schema.String;
|
|
129
|
+
}>;
|
|
130
|
+
readonly go: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
131
|
+
readonly rolling: Schema.Struct<{
|
|
132
|
+
/** How much of the window's allowance is used. */
|
|
133
|
+
readonly percent: Schema.Finite;
|
|
134
|
+
/** Go refuses requests until the window resets. */
|
|
135
|
+
readonly limited: Schema.Boolean;
|
|
136
|
+
readonly resetsAt: Schema.Finite;
|
|
137
|
+
}>;
|
|
138
|
+
readonly weekly: Schema.Struct<{
|
|
139
|
+
/** How much of the window's allowance is used. */
|
|
140
|
+
readonly percent: Schema.Finite;
|
|
141
|
+
/** Go refuses requests until the window resets. */
|
|
142
|
+
readonly limited: Schema.Boolean;
|
|
143
|
+
readonly resetsAt: Schema.Finite;
|
|
144
|
+
}>;
|
|
145
|
+
readonly monthly: Schema.Struct<{
|
|
146
|
+
/** How much of the window's allowance is used. */
|
|
147
|
+
readonly percent: Schema.Finite;
|
|
148
|
+
/** Go refuses requests until the window resets. */
|
|
149
|
+
readonly limited: Schema.Boolean;
|
|
150
|
+
readonly resetsAt: Schema.Finite;
|
|
151
|
+
}>;
|
|
152
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
153
|
+
readonly rolling: Schema.Struct<{
|
|
154
|
+
/** How much of the window's allowance is used. */
|
|
155
|
+
readonly percent: Schema.Finite;
|
|
156
|
+
/** Go refuses requests until the window resets. */
|
|
157
|
+
readonly limited: Schema.Boolean;
|
|
158
|
+
readonly resetsAt: Schema.Finite;
|
|
159
|
+
}>;
|
|
160
|
+
readonly weekly: Schema.Struct<{
|
|
161
|
+
/** How much of the window's allowance is used. */
|
|
162
|
+
readonly percent: Schema.Finite;
|
|
163
|
+
/** Go refuses requests until the window resets. */
|
|
164
|
+
readonly limited: Schema.Boolean;
|
|
165
|
+
readonly resetsAt: Schema.Finite;
|
|
166
|
+
}>;
|
|
167
|
+
readonly monthly: Schema.Struct<{
|
|
168
|
+
/** How much of the window's allowance is used. */
|
|
169
|
+
readonly percent: Schema.Finite;
|
|
170
|
+
/** Go refuses requests until the window resets. */
|
|
171
|
+
readonly limited: Schema.Boolean;
|
|
172
|
+
readonly resetsAt: Schema.Finite;
|
|
173
|
+
}>;
|
|
174
|
+
}>>, never, never>;
|
|
175
|
+
readonly budgets: Schema.$Array<Schema.Struct<{
|
|
176
|
+
readonly id: Schema.String;
|
|
177
|
+
readonly limit: Schema.brand<Schema.Finite, "Money.USD"> & {
|
|
178
|
+
zero: number & import("effect/Brand").Brand<"Money.USD">;
|
|
179
|
+
};
|
|
180
|
+
/** The member's spend this month, or the pooled spend of a combined budget; per model, the most on one model. */
|
|
181
|
+
readonly spent: Schema.brand<Schema.Finite, "Money.USD"> & {
|
|
182
|
+
zero: number & import("effect/Brand").Brand<"Money.USD">;
|
|
183
|
+
};
|
|
184
|
+
/** `each` limits every member separately; `combined` pools everyone's spend against one limit. */
|
|
185
|
+
readonly scope: Schema.Literals<readonly ["each", "combined"]>;
|
|
186
|
+
/** `set` counts spend across the budget's models; `model` limits each model separately. */
|
|
187
|
+
readonly per: Schema.Literals<readonly ["set", "model"]>;
|
|
188
|
+
/** `all` covers every model and billable service; `models` covers only `models`. */
|
|
189
|
+
readonly coverage: Schema.Literals<readonly ["all", "models"]>;
|
|
190
|
+
readonly models: Schema.$Array<Schema.Struct<{
|
|
191
|
+
readonly providerID: Schema.brand<Schema.String, "Provider.ID"> & {
|
|
192
|
+
opencode: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
193
|
+
anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
194
|
+
openai: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
195
|
+
google: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
196
|
+
googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
197
|
+
githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
198
|
+
amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
199
|
+
azure: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
200
|
+
openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
201
|
+
mistral: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
202
|
+
gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
203
|
+
};
|
|
204
|
+
readonly modelID: Schema.brand<Schema.String, "Model.ID">;
|
|
205
|
+
readonly name: Schema.String;
|
|
206
|
+
/** What a per-model budget's member has spent on this model this month. */
|
|
207
|
+
readonly spent: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.Finite, "Money.USD"> & {
|
|
208
|
+
zero: number & import("effect/Brand").Brand<"Money.USD">;
|
|
209
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.Finite, "Money.USD"> & {
|
|
210
|
+
zero: number & import("effect/Brand").Brand<"Money.USD">;
|
|
211
|
+
}>, never, never>;
|
|
212
|
+
}>>;
|
|
213
|
+
/** The vendors whose models the budget counts, by name; empty when it doesn't count by vendor. */
|
|
214
|
+
readonly vendors: Schema.$Array<Schema.String>;
|
|
215
|
+
/** The input price per 1M tokens from which the budget counts a model, when it sets one. */
|
|
216
|
+
readonly inputPriceAtLeast: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.Finite, "Money.USDPerMillionTokens"> & {
|
|
217
|
+
zero: number & import("effect/Brand").Brand<"Money.USDPerMillionTokens">;
|
|
218
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.Finite, "Money.USDPerMillionTokens"> & {
|
|
219
|
+
zero: number & import("effect/Brand").Brand<"Money.USDPerMillionTokens">;
|
|
220
|
+
}>, never, never>;
|
|
221
|
+
/** The budget counts models picked one by one, rather than by vendor or price. */
|
|
222
|
+
readonly picked: Schema.Boolean;
|
|
223
|
+
/** Everyone in the workspace pools spend against it, so reaching it pauses model use for all of them. */
|
|
224
|
+
readonly shared: Schema.Boolean;
|
|
225
|
+
readonly resetsAt: Schema.Finite;
|
|
226
|
+
}>>;
|
|
227
|
+
}>;
|