@opencode-ai/client 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.
package/dist/effect/api/api.d.ts
CHANGED
|
@@ -130,9 +130,7 @@ export type SessionStatsInput = {
|
|
|
130
130
|
readonly to?: number | undefined;
|
|
131
131
|
readonly project?: Project.ID | undefined;
|
|
132
132
|
readonly timezone?: string | undefined;
|
|
133
|
-
readonly
|
|
134
|
-
readonly tools?: boolean | undefined;
|
|
135
|
-
readonly toolSummary?: boolean | undefined;
|
|
133
|
+
readonly tools?: "none" | "summary" | "detail" | undefined;
|
|
136
134
|
};
|
|
137
135
|
export type SessionStatsOutput = {
|
|
138
136
|
readonly range: {
|
|
@@ -154,10 +152,31 @@ export type SessionStatsOutput = {
|
|
|
154
152
|
};
|
|
155
153
|
readonly cost: number & Brand.Brand<"Money.USD">;
|
|
156
154
|
readonly tools: {
|
|
157
|
-
readonly
|
|
158
|
-
|
|
159
|
-
readonly
|
|
160
|
-
readonly
|
|
155
|
+
readonly mode: "none";
|
|
156
|
+
} | {
|
|
157
|
+
readonly mode: "summary";
|
|
158
|
+
readonly totals: {
|
|
159
|
+
readonly calls: number;
|
|
160
|
+
readonly succeeded: number;
|
|
161
|
+
readonly failed: number;
|
|
162
|
+
readonly unfinished: number;
|
|
163
|
+
};
|
|
164
|
+
} | {
|
|
165
|
+
readonly mode: "detail";
|
|
166
|
+
readonly totals: {
|
|
167
|
+
readonly calls: number;
|
|
168
|
+
readonly succeeded: number;
|
|
169
|
+
readonly failed: number;
|
|
170
|
+
readonly unfinished: number;
|
|
171
|
+
};
|
|
172
|
+
readonly usage: ReadonlyArray<{
|
|
173
|
+
readonly name: string;
|
|
174
|
+
readonly calls: number;
|
|
175
|
+
readonly succeeded: number;
|
|
176
|
+
readonly failed: number;
|
|
177
|
+
readonly unfinished: number;
|
|
178
|
+
readonly durationP50?: number | undefined;
|
|
179
|
+
}>;
|
|
161
180
|
};
|
|
162
181
|
readonly activeDays: number;
|
|
163
182
|
readonly streak: number;
|
|
@@ -179,14 +198,6 @@ export type SessionStatsOutput = {
|
|
|
179
198
|
};
|
|
180
199
|
readonly cost: number & Brand.Brand<"Money.USD">;
|
|
181
200
|
}>;
|
|
182
|
-
readonly toolUsage: ReadonlyArray<{
|
|
183
|
-
readonly name: string;
|
|
184
|
-
readonly calls: number;
|
|
185
|
-
readonly succeeded: number;
|
|
186
|
-
readonly failed: number;
|
|
187
|
-
readonly unfinished: number;
|
|
188
|
-
readonly durationP50?: number | undefined;
|
|
189
|
-
}>;
|
|
190
201
|
};
|
|
191
202
|
export type SessionStatsOperation<E = never> = (input?: SessionStatsInput) => Effect.Effect<SessionStatsOutput, E>;
|
|
192
203
|
export type SessionCreateInput = {
|
|
@@ -43,9 +43,7 @@ const EndpointSessionStats = (raw) => (input) => preserveEffect()(raw["session.s
|
|
|
43
43
|
to: input?.["to"],
|
|
44
44
|
project: input?.["project"],
|
|
45
45
|
timezone: input?.["timezone"],
|
|
46
|
-
models: input?.["models"],
|
|
47
46
|
tools: input?.["tools"],
|
|
48
|
-
toolSummary: input?.["toolSummary"],
|
|
49
47
|
},
|
|
50
48
|
}).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
|
|
51
49
|
const EndpointSessionCreate = (raw) => (input) => preserveEffect()(raw["session.create"]({
|
|
@@ -198,9 +198,7 @@ export function make(options) {
|
|
|
198
198
|
to: input?.["to"],
|
|
199
199
|
project: input?.["project"],
|
|
200
200
|
timezone: input?.["timezone"],
|
|
201
|
-
models: input?.["models"],
|
|
202
201
|
tools: input?.["tools"],
|
|
203
|
-
toolSummary: input?.["toolSummary"],
|
|
204
202
|
},
|
|
205
203
|
successStatus: 200,
|
|
206
204
|
declaredStatuses: [400, 401],
|
|
@@ -55,9 +55,11 @@ export type FileDiffInfo = {
|
|
|
55
55
|
deletions: number;
|
|
56
56
|
status: "added" | "deleted" | "modified";
|
|
57
57
|
};
|
|
58
|
-
export type
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
export type SessionStatsToolTotals = {
|
|
59
|
+
calls: number;
|
|
60
|
+
succeeded: number;
|
|
61
|
+
failed: number;
|
|
62
|
+
unfinished: number;
|
|
61
63
|
};
|
|
62
64
|
export type SessionStatsToolUsage = {
|
|
63
65
|
name: string;
|
|
@@ -67,6 +69,10 @@ export type SessionStatsToolUsage = {
|
|
|
67
69
|
unfinished: number;
|
|
68
70
|
durationP50?: number;
|
|
69
71
|
};
|
|
72
|
+
export type SessionStatsActivity = {
|
|
73
|
+
date: string;
|
|
74
|
+
steps: number;
|
|
75
|
+
};
|
|
70
76
|
export type SessionMessageAgentSelected = {
|
|
71
77
|
id: string;
|
|
72
78
|
metadata?: {
|
|
@@ -651,6 +657,16 @@ export type SessionRevert = {
|
|
|
651
657
|
snapshot?: string;
|
|
652
658
|
files?: Array<FileDiffInfo>;
|
|
653
659
|
};
|
|
660
|
+
export type SessionStatsTools = {
|
|
661
|
+
mode: "none";
|
|
662
|
+
} | {
|
|
663
|
+
mode: "summary";
|
|
664
|
+
totals: SessionStatsToolTotals;
|
|
665
|
+
} | {
|
|
666
|
+
mode: "detail";
|
|
667
|
+
totals: SessionStatsToolTotals;
|
|
668
|
+
usage: Array<SessionStatsToolUsage>;
|
|
669
|
+
};
|
|
654
670
|
export type SessionStatsModelUsage = {
|
|
655
671
|
model: ModelRef;
|
|
656
672
|
steps: number;
|
|
@@ -2231,17 +2247,11 @@ export type SessionStatsInfo = {
|
|
|
2231
2247
|
steps: number;
|
|
2232
2248
|
tokens: TokenUsageInfo;
|
|
2233
2249
|
cost: MoneyUSD;
|
|
2234
|
-
tools:
|
|
2235
|
-
calls: number;
|
|
2236
|
-
succeeded: number;
|
|
2237
|
-
failed: number;
|
|
2238
|
-
unfinished: number;
|
|
2239
|
-
};
|
|
2250
|
+
tools: SessionStatsTools;
|
|
2240
2251
|
activeDays: number;
|
|
2241
2252
|
streak: number;
|
|
2242
2253
|
activity: Array<SessionStatsActivity>;
|
|
2243
2254
|
models: Array<SessionStatsModelUsage>;
|
|
2244
|
-
toolUsage: Array<SessionStatsToolUsage>;
|
|
2245
2255
|
};
|
|
2246
2256
|
export type SessionMessageUser = {
|
|
2247
2257
|
id: string;
|
|
@@ -3210,64 +3220,36 @@ export type SessionStatsInput = {
|
|
|
3210
3220
|
readonly to?: number | undefined;
|
|
3211
3221
|
readonly project?: string | undefined;
|
|
3212
3222
|
readonly timezone?: string | undefined;
|
|
3213
|
-
readonly
|
|
3214
|
-
readonly tools?: boolean | undefined;
|
|
3215
|
-
readonly toolSummary?: boolean | undefined;
|
|
3223
|
+
readonly tools?: "none" | "summary" | "detail" | undefined;
|
|
3216
3224
|
}["from"];
|
|
3217
3225
|
readonly to?: {
|
|
3218
3226
|
readonly from?: number | undefined;
|
|
3219
3227
|
readonly to?: number | undefined;
|
|
3220
3228
|
readonly project?: string | undefined;
|
|
3221
3229
|
readonly timezone?: string | undefined;
|
|
3222
|
-
readonly
|
|
3223
|
-
readonly tools?: boolean | undefined;
|
|
3224
|
-
readonly toolSummary?: boolean | undefined;
|
|
3230
|
+
readonly tools?: "none" | "summary" | "detail" | undefined;
|
|
3225
3231
|
}["to"];
|
|
3226
3232
|
readonly project?: {
|
|
3227
3233
|
readonly from?: number | undefined;
|
|
3228
3234
|
readonly to?: number | undefined;
|
|
3229
3235
|
readonly project?: string | undefined;
|
|
3230
3236
|
readonly timezone?: string | undefined;
|
|
3231
|
-
readonly
|
|
3232
|
-
readonly tools?: boolean | undefined;
|
|
3233
|
-
readonly toolSummary?: boolean | undefined;
|
|
3237
|
+
readonly tools?: "none" | "summary" | "detail" | undefined;
|
|
3234
3238
|
}["project"];
|
|
3235
3239
|
readonly timezone?: {
|
|
3236
3240
|
readonly from?: number | undefined;
|
|
3237
3241
|
readonly to?: number | undefined;
|
|
3238
3242
|
readonly project?: string | undefined;
|
|
3239
3243
|
readonly timezone?: string | undefined;
|
|
3240
|
-
readonly
|
|
3241
|
-
readonly tools?: boolean | undefined;
|
|
3242
|
-
readonly toolSummary?: boolean | undefined;
|
|
3244
|
+
readonly tools?: "none" | "summary" | "detail" | undefined;
|
|
3243
3245
|
}["timezone"];
|
|
3244
|
-
readonly models?: {
|
|
3245
|
-
readonly from?: number | undefined;
|
|
3246
|
-
readonly to?: number | undefined;
|
|
3247
|
-
readonly project?: string | undefined;
|
|
3248
|
-
readonly timezone?: string | undefined;
|
|
3249
|
-
readonly models?: boolean | undefined;
|
|
3250
|
-
readonly tools?: boolean | undefined;
|
|
3251
|
-
readonly toolSummary?: boolean | undefined;
|
|
3252
|
-
}["models"];
|
|
3253
3246
|
readonly tools?: {
|
|
3254
3247
|
readonly from?: number | undefined;
|
|
3255
3248
|
readonly to?: number | undefined;
|
|
3256
3249
|
readonly project?: string | undefined;
|
|
3257
3250
|
readonly timezone?: string | undefined;
|
|
3258
|
-
readonly
|
|
3259
|
-
readonly tools?: boolean | undefined;
|
|
3260
|
-
readonly toolSummary?: boolean | undefined;
|
|
3251
|
+
readonly tools?: "none" | "summary" | "detail" | undefined;
|
|
3261
3252
|
}["tools"];
|
|
3262
|
-
readonly toolSummary?: {
|
|
3263
|
-
readonly from?: number | undefined;
|
|
3264
|
-
readonly to?: number | undefined;
|
|
3265
|
-
readonly project?: string | undefined;
|
|
3266
|
-
readonly timezone?: string | undefined;
|
|
3267
|
-
readonly models?: boolean | undefined;
|
|
3268
|
-
readonly tools?: boolean | undefined;
|
|
3269
|
-
readonly toolSummary?: boolean | undefined;
|
|
3270
|
-
}["toolSummary"];
|
|
3271
3253
|
};
|
|
3272
3254
|
export type SessionStatsOutput = {
|
|
3273
3255
|
data: SessionStatsInfo;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@opencode-ai/client",
|
|
4
|
-
"version": "0.0.0-dev-
|
|
4
|
+
"version": "0.0.0-dev-18083",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
"typecheck": "tsgo --noEmit"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@opencode-ai/schema": "0.0.0-dev-
|
|
61
|
-
"@opencode-ai/protocol": "0.0.0-dev-
|
|
60
|
+
"@opencode-ai/schema": "0.0.0-dev-18083",
|
|
61
|
+
"@opencode-ai/protocol": "0.0.0-dev-18083"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"effect": "4.0.0-rc.111",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@effect/platform-node": "4.0.0-rc.111",
|
|
77
|
-
"@opencode-ai/httpapi-codegen": "0.0.0-dev-
|
|
77
|
+
"@opencode-ai/httpapi-codegen": "0.0.0-dev-18083",
|
|
78
78
|
"@tsconfig/bun": "1.0.9",
|
|
79
79
|
"@types/bun": "1.3.13",
|
|
80
80
|
"@typescript/native-preview": "7.0.0-dev.20251207.1",
|