@opencode-ai/schema 0.0.0-dev-18081 → 0.0.0-dev-18083

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.
@@ -53,6 +53,43 @@ export declare const ToolUsage: Schema.Struct<{
53
53
  readonly durationP50: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
54
54
  }>;
55
55
  export type ToolUsage = typeof ToolUsage.Type;
56
+ export declare const ToolMode: Schema.Literals<readonly ["none", "summary", "detail"]>;
57
+ export type ToolMode = typeof ToolMode.Type;
58
+ export declare const ToolTotals: Schema.Struct<{
59
+ readonly calls: Schema.Int;
60
+ readonly succeeded: Schema.Int;
61
+ readonly failed: Schema.Int;
62
+ readonly unfinished: Schema.Int;
63
+ }>;
64
+ export type ToolTotals = typeof ToolTotals.Type;
65
+ export declare const Tools: Schema.Union<readonly [Schema.Struct<{
66
+ readonly mode: Schema.Literal<"none">;
67
+ }>, Schema.Struct<{
68
+ readonly mode: Schema.Literal<"summary">;
69
+ readonly totals: Schema.Struct<{
70
+ readonly calls: Schema.Int;
71
+ readonly succeeded: Schema.Int;
72
+ readonly failed: Schema.Int;
73
+ readonly unfinished: Schema.Int;
74
+ }>;
75
+ }>, Schema.Struct<{
76
+ readonly mode: Schema.Literal<"detail">;
77
+ readonly totals: Schema.Struct<{
78
+ readonly calls: Schema.Int;
79
+ readonly succeeded: Schema.Int;
80
+ readonly failed: Schema.Int;
81
+ readonly unfinished: Schema.Int;
82
+ }>;
83
+ readonly usage: Schema.$Array<Schema.Struct<{
84
+ readonly name: Schema.String;
85
+ readonly calls: Schema.Int;
86
+ readonly succeeded: Schema.Int;
87
+ readonly failed: Schema.Int;
88
+ readonly unfinished: Schema.Int;
89
+ readonly durationP50: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
90
+ }>>;
91
+ }>]>;
92
+ export type Tools = typeof Tools.Type;
56
93
  export declare const Info: Schema.Struct<{
57
94
  readonly range: Schema.Struct<{
58
95
  readonly from: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
@@ -74,12 +111,33 @@ export declare const Info: Schema.Struct<{
74
111
  readonly cost: Schema.brand<Schema.Finite, "Money.USD"> & {
75
112
  zero: number & import("effect/Brand").Brand<"Money.USD">;
76
113
  };
77
- readonly tools: Schema.Struct<{
78
- readonly calls: Schema.Int;
79
- readonly succeeded: Schema.Int;
80
- readonly failed: Schema.Int;
81
- readonly unfinished: Schema.Int;
82
- }>;
114
+ readonly tools: Schema.Union<readonly [Schema.Struct<{
115
+ readonly mode: Schema.Literal<"none">;
116
+ }>, Schema.Struct<{
117
+ readonly mode: Schema.Literal<"summary">;
118
+ readonly totals: Schema.Struct<{
119
+ readonly calls: Schema.Int;
120
+ readonly succeeded: Schema.Int;
121
+ readonly failed: Schema.Int;
122
+ readonly unfinished: Schema.Int;
123
+ }>;
124
+ }>, Schema.Struct<{
125
+ readonly mode: Schema.Literal<"detail">;
126
+ readonly totals: Schema.Struct<{
127
+ readonly calls: Schema.Int;
128
+ readonly succeeded: Schema.Int;
129
+ readonly failed: Schema.Int;
130
+ readonly unfinished: Schema.Int;
131
+ }>;
132
+ readonly usage: Schema.$Array<Schema.Struct<{
133
+ readonly name: Schema.String;
134
+ readonly calls: Schema.Int;
135
+ readonly succeeded: Schema.Int;
136
+ readonly failed: Schema.Int;
137
+ readonly unfinished: Schema.Int;
138
+ readonly durationP50: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
139
+ }>>;
140
+ }>]>;
83
141
  readonly activeDays: Schema.Int;
84
142
  readonly streak: Schema.Int;
85
143
  readonly activity: Schema.$Array<Schema.Struct<{
@@ -124,13 +182,5 @@ export declare const Info: Schema.Struct<{
124
182
  zero: number & import("effect/Brand").Brand<"Money.USD">;
125
183
  };
126
184
  }>>;
127
- readonly toolUsage: Schema.$Array<Schema.Struct<{
128
- readonly name: Schema.String;
129
- readonly calls: Schema.Int;
130
- readonly succeeded: Schema.Int;
131
- readonly failed: Schema.Int;
132
- readonly unfinished: Schema.Int;
133
- readonly durationP50: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
134
- }>>;
135
185
  }>;
136
186
  export type Info = typeof Info.Type;
@@ -22,6 +22,18 @@ export const ToolUsage = Schema.Struct({
22
22
  unfinished: NonNegativeInt,
23
23
  durationP50: Schema.Finite.pipe(optional),
24
24
  }).annotate({ identifier: "SessionStats.ToolUsage" });
25
+ export const ToolMode = Schema.Literals(["none", "summary", "detail"]);
26
+ export const ToolTotals = Schema.Struct({
27
+ calls: NonNegativeInt,
28
+ succeeded: NonNegativeInt,
29
+ failed: NonNegativeInt,
30
+ unfinished: NonNegativeInt,
31
+ }).annotate({ identifier: "SessionStats.ToolTotals" });
32
+ export const Tools = Schema.Union([
33
+ Schema.Struct({ mode: Schema.Literal("none") }),
34
+ Schema.Struct({ mode: Schema.Literal("summary"), totals: ToolTotals }),
35
+ Schema.Struct({ mode: Schema.Literal("detail"), totals: ToolTotals, usage: Schema.Array(ToolUsage) }),
36
+ ]).annotate({ identifier: "SessionStats.Tools" });
25
37
  export const Info = Schema.Struct({
26
38
  range: Schema.Struct({
27
39
  from: DateTimeUtcFromMillis,
@@ -33,15 +45,9 @@ export const Info = Schema.Struct({
33
45
  steps: NonNegativeInt,
34
46
  tokens: TokenUsage.Info,
35
47
  cost: Money.USD,
36
- tools: Schema.Struct({
37
- calls: NonNegativeInt,
38
- succeeded: NonNegativeInt,
39
- failed: NonNegativeInt,
40
- unfinished: NonNegativeInt,
41
- }),
48
+ tools: Tools,
42
49
  activeDays: NonNegativeInt,
43
50
  streak: NonNegativeInt,
44
51
  activity: Schema.Array(Activity),
45
52
  models: Schema.Array(ModelUsage),
46
- toolUsage: Schema.Array(ToolUsage),
47
53
  }).annotate({ identifier: "SessionStats.Info" });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode-ai/schema",
4
- "version": "0.0.0-dev-18081",
4
+ "version": "0.0.0-dev-18083",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {