@opencode/client 0.0.0-dev-19382 → 0.0.0-dev-19386
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
|
@@ -1251,6 +1251,16 @@ export type SessionLogOutput = ({
|
|
|
1251
1251
|
} | undefined;
|
|
1252
1252
|
readonly text: string;
|
|
1253
1253
|
readonly recent: string;
|
|
1254
|
+
readonly cost?: (number & Brand.Brand<"Money.USD">) | undefined;
|
|
1255
|
+
readonly tokens?: {
|
|
1256
|
+
readonly input: number;
|
|
1257
|
+
readonly output: number;
|
|
1258
|
+
readonly reasoning: number;
|
|
1259
|
+
readonly cache: {
|
|
1260
|
+
readonly read: number;
|
|
1261
|
+
readonly write: number;
|
|
1262
|
+
};
|
|
1263
|
+
} | undefined;
|
|
1254
1264
|
};
|
|
1255
1265
|
} | {
|
|
1256
1266
|
readonly id: Event.ID;
|
|
@@ -1274,6 +1284,16 @@ export type SessionLogOutput = ({
|
|
|
1274
1284
|
readonly status?: number | undefined;
|
|
1275
1285
|
};
|
|
1276
1286
|
readonly inputID?: SessionMessage.ID | undefined;
|
|
1287
|
+
readonly cost?: (number & Brand.Brand<"Money.USD">) | undefined;
|
|
1288
|
+
readonly tokens?: {
|
|
1289
|
+
readonly input: number;
|
|
1290
|
+
readonly output: number;
|
|
1291
|
+
readonly reasoning: number;
|
|
1292
|
+
readonly cache: {
|
|
1293
|
+
readonly read: number;
|
|
1294
|
+
readonly write: number;
|
|
1295
|
+
};
|
|
1296
|
+
} | undefined;
|
|
1277
1297
|
};
|
|
1278
1298
|
} | {
|
|
1279
1299
|
readonly id: Event.ID;
|
package/dist/effect/client.d.ts
CHANGED
|
@@ -1578,6 +1578,7 @@ export declare const make: (options?: {
|
|
|
1578
1578
|
readonly text: string;
|
|
1579
1579
|
readonly reason: "auto" | "manual";
|
|
1580
1580
|
readonly recent: string;
|
|
1581
|
+
readonly cost?: (number & import("effect/Brand").Brand<"Money.USD">) | undefined;
|
|
1581
1582
|
readonly model?: {
|
|
1582
1583
|
readonly id: string & import("effect/Brand").Brand<"Model.ID">;
|
|
1583
1584
|
readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
@@ -1586,6 +1587,15 @@ export declare const make: (options?: {
|
|
|
1586
1587
|
readonly providerState?: {
|
|
1587
1588
|
readonly [x: string]: unknown;
|
|
1588
1589
|
} | undefined;
|
|
1590
|
+
readonly tokens?: {
|
|
1591
|
+
readonly input: number;
|
|
1592
|
+
readonly output: number;
|
|
1593
|
+
readonly reasoning: number;
|
|
1594
|
+
readonly cache: {
|
|
1595
|
+
readonly read: number;
|
|
1596
|
+
readonly write: number;
|
|
1597
|
+
};
|
|
1598
|
+
} | undefined;
|
|
1589
1599
|
readonly providerContext?: {
|
|
1590
1600
|
readonly version: 1;
|
|
1591
1601
|
readonly provenance: {
|
|
@@ -1623,6 +1633,16 @@ export declare const make: (options?: {
|
|
|
1623
1633
|
readonly status?: number | undefined;
|
|
1624
1634
|
};
|
|
1625
1635
|
readonly reason: "auto" | "manual";
|
|
1636
|
+
readonly cost?: (number & import("effect/Brand").Brand<"Money.USD">) | undefined;
|
|
1637
|
+
readonly tokens?: {
|
|
1638
|
+
readonly input: number;
|
|
1639
|
+
readonly output: number;
|
|
1640
|
+
readonly reasoning: number;
|
|
1641
|
+
readonly cache: {
|
|
1642
|
+
readonly read: number;
|
|
1643
|
+
readonly write: number;
|
|
1644
|
+
};
|
|
1645
|
+
} | undefined;
|
|
1626
1646
|
readonly inputID?: (string & import("effect/Brand").Brand<"Session.Message.ID">) | undefined;
|
|
1627
1647
|
};
|
|
1628
1648
|
readonly durable: {
|
|
@@ -1745,6 +1745,7 @@ export declare const make: (options?: {
|
|
|
1745
1745
|
readonly text: string;
|
|
1746
1746
|
readonly reason: "auto" | "manual";
|
|
1747
1747
|
readonly recent: string;
|
|
1748
|
+
readonly cost?: (number & import("effect/Brand").Brand<"Money.USD">) | undefined;
|
|
1748
1749
|
readonly model?: {
|
|
1749
1750
|
readonly id: string & import("effect/Brand").Brand<"Model.ID">;
|
|
1750
1751
|
readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
@@ -1753,6 +1754,15 @@ export declare const make: (options?: {
|
|
|
1753
1754
|
readonly providerState?: {
|
|
1754
1755
|
readonly [x: string]: unknown;
|
|
1755
1756
|
} | undefined;
|
|
1757
|
+
readonly tokens?: {
|
|
1758
|
+
readonly input: number;
|
|
1759
|
+
readonly output: number;
|
|
1760
|
+
readonly reasoning: number;
|
|
1761
|
+
readonly cache: {
|
|
1762
|
+
readonly read: number;
|
|
1763
|
+
readonly write: number;
|
|
1764
|
+
};
|
|
1765
|
+
} | undefined;
|
|
1756
1766
|
readonly providerContext?: {
|
|
1757
1767
|
readonly version: 1;
|
|
1758
1768
|
readonly provenance: {
|
|
@@ -1790,6 +1800,16 @@ export declare const make: (options?: {
|
|
|
1790
1800
|
readonly status?: number | undefined;
|
|
1791
1801
|
};
|
|
1792
1802
|
readonly reason: "auto" | "manual";
|
|
1803
|
+
readonly cost?: (number & import("effect/Brand").Brand<"Money.USD">) | undefined;
|
|
1804
|
+
readonly tokens?: {
|
|
1805
|
+
readonly input: number;
|
|
1806
|
+
readonly output: number;
|
|
1807
|
+
readonly reasoning: number;
|
|
1808
|
+
readonly cache: {
|
|
1809
|
+
readonly read: number;
|
|
1810
|
+
readonly write: number;
|
|
1811
|
+
};
|
|
1812
|
+
} | undefined;
|
|
1793
1813
|
readonly inputID?: (string & import("effect/Brand").Brand<"Session.Message.ID">) | undefined;
|
|
1794
1814
|
};
|
|
1795
1815
|
readonly durable: {
|
|
@@ -807,6 +807,8 @@ export type SessionMessageCompactionFailed = {
|
|
|
807
807
|
status: "failed";
|
|
808
808
|
reason: "auto" | "manual";
|
|
809
809
|
error: SessionStructuredError;
|
|
810
|
+
cost?: MoneyUSD;
|
|
811
|
+
tokens?: TokenUsageInfo;
|
|
810
812
|
};
|
|
811
813
|
export type SessionProviderContext = {
|
|
812
814
|
version: 1;
|
|
@@ -1321,6 +1323,8 @@ export type SessionCompactionFailed = {
|
|
|
1321
1323
|
reason: "auto" | "manual";
|
|
1322
1324
|
error: SessionStructuredError;
|
|
1323
1325
|
inputID?: string;
|
|
1326
|
+
cost?: MoneyUSD;
|
|
1327
|
+
tokens?: TokenUsageInfo;
|
|
1324
1328
|
};
|
|
1325
1329
|
};
|
|
1326
1330
|
export type SessionRevertCleared = {
|
|
@@ -2490,6 +2494,8 @@ export type SessionMessageCompactionCompleted = {
|
|
|
2490
2494
|
summary: string;
|
|
2491
2495
|
recent: string;
|
|
2492
2496
|
providerContext?: SessionProviderContext;
|
|
2497
|
+
cost?: MoneyUSD;
|
|
2498
|
+
tokens?: TokenUsageInfo;
|
|
2493
2499
|
};
|
|
2494
2500
|
export type SessionCompactionEnded = {
|
|
2495
2501
|
id: string;
|
|
@@ -2512,6 +2518,8 @@ export type SessionCompactionEnded = {
|
|
|
2512
2518
|
providerContext?: SessionProviderContext;
|
|
2513
2519
|
text: string;
|
|
2514
2520
|
recent: string;
|
|
2521
|
+
cost?: MoneyUSD;
|
|
2522
|
+
tokens?: TokenUsageInfo;
|
|
2515
2523
|
};
|
|
2516
2524
|
};
|
|
2517
2525
|
export type SessionForked = {
|
|
@@ -4116,6 +4124,16 @@ export type SessionImportInput = {
|
|
|
4116
4124
|
};
|
|
4117
4125
|
readonly messages: JsonValue;
|
|
4118
4126
|
};
|
|
4127
|
+
readonly cost?: number;
|
|
4128
|
+
readonly tokens?: {
|
|
4129
|
+
readonly input: number;
|
|
4130
|
+
readonly output: number;
|
|
4131
|
+
readonly reasoning: number;
|
|
4132
|
+
readonly cache: {
|
|
4133
|
+
readonly read: number;
|
|
4134
|
+
readonly write: number;
|
|
4135
|
+
};
|
|
4136
|
+
};
|
|
4119
4137
|
} | {
|
|
4120
4138
|
readonly type: "compaction";
|
|
4121
4139
|
readonly id: string;
|
|
@@ -4132,6 +4150,16 @@ export type SessionImportInput = {
|
|
|
4132
4150
|
readonly message: string;
|
|
4133
4151
|
readonly status?: number;
|
|
4134
4152
|
};
|
|
4153
|
+
readonly cost?: number;
|
|
4154
|
+
readonly tokens?: {
|
|
4155
|
+
readonly input: number;
|
|
4156
|
+
readonly output: number;
|
|
4157
|
+
readonly reasoning: number;
|
|
4158
|
+
readonly cache: {
|
|
4159
|
+
readonly read: number;
|
|
4160
|
+
readonly write: number;
|
|
4161
|
+
};
|
|
4162
|
+
};
|
|
4135
4163
|
})>;
|
|
4136
4164
|
readonly location?: {
|
|
4137
4165
|
readonly directory: string;
|
|
@@ -4554,6 +4582,16 @@ export type SessionImportInput = {
|
|
|
4554
4582
|
};
|
|
4555
4583
|
readonly messages: JsonValue;
|
|
4556
4584
|
};
|
|
4585
|
+
readonly cost?: number;
|
|
4586
|
+
readonly tokens?: {
|
|
4587
|
+
readonly input: number;
|
|
4588
|
+
readonly output: number;
|
|
4589
|
+
readonly reasoning: number;
|
|
4590
|
+
readonly cache: {
|
|
4591
|
+
readonly read: number;
|
|
4592
|
+
readonly write: number;
|
|
4593
|
+
};
|
|
4594
|
+
};
|
|
4557
4595
|
} | {
|
|
4558
4596
|
readonly type: "compaction";
|
|
4559
4597
|
readonly id: string;
|
|
@@ -4570,6 +4608,16 @@ export type SessionImportInput = {
|
|
|
4570
4608
|
readonly message: string;
|
|
4571
4609
|
readonly status?: number;
|
|
4572
4610
|
};
|
|
4611
|
+
readonly cost?: number;
|
|
4612
|
+
readonly tokens?: {
|
|
4613
|
+
readonly input: number;
|
|
4614
|
+
readonly output: number;
|
|
4615
|
+
readonly reasoning: number;
|
|
4616
|
+
readonly cache: {
|
|
4617
|
+
readonly read: number;
|
|
4618
|
+
readonly write: number;
|
|
4619
|
+
};
|
|
4620
|
+
};
|
|
4573
4621
|
})>;
|
|
4574
4622
|
readonly location?: {
|
|
4575
4623
|
readonly directory: string;
|
|
@@ -4992,6 +5040,16 @@ export type SessionImportInput = {
|
|
|
4992
5040
|
};
|
|
4993
5041
|
readonly messages: JsonValue;
|
|
4994
5042
|
};
|
|
5043
|
+
readonly cost?: number;
|
|
5044
|
+
readonly tokens?: {
|
|
5045
|
+
readonly input: number;
|
|
5046
|
+
readonly output: number;
|
|
5047
|
+
readonly reasoning: number;
|
|
5048
|
+
readonly cache: {
|
|
5049
|
+
readonly read: number;
|
|
5050
|
+
readonly write: number;
|
|
5051
|
+
};
|
|
5052
|
+
};
|
|
4995
5053
|
} | {
|
|
4996
5054
|
readonly type: "compaction";
|
|
4997
5055
|
readonly id: string;
|
|
@@ -5008,6 +5066,16 @@ export type SessionImportInput = {
|
|
|
5008
5066
|
readonly message: string;
|
|
5009
5067
|
readonly status?: number;
|
|
5010
5068
|
};
|
|
5069
|
+
readonly cost?: number;
|
|
5070
|
+
readonly tokens?: {
|
|
5071
|
+
readonly input: number;
|
|
5072
|
+
readonly output: number;
|
|
5073
|
+
readonly reasoning: number;
|
|
5074
|
+
readonly cache: {
|
|
5075
|
+
readonly read: number;
|
|
5076
|
+
readonly write: number;
|
|
5077
|
+
};
|
|
5078
|
+
};
|
|
5011
5079
|
})>;
|
|
5012
5080
|
readonly location?: {
|
|
5013
5081
|
readonly directory: string;
|
package/dist/solid/data.js
CHANGED
|
@@ -945,8 +945,11 @@ export function createData(config) {
|
|
|
945
945
|
reason: event.data.reason,
|
|
946
946
|
model: event.data.model,
|
|
947
947
|
providerState: event.data.providerState,
|
|
948
|
+
providerContext: event.data.providerContext,
|
|
948
949
|
summary: event.data.text,
|
|
949
950
|
recent: event.data.recent,
|
|
951
|
+
cost: event.data.cost,
|
|
952
|
+
tokens: event.data.tokens,
|
|
950
953
|
});
|
|
951
954
|
return;
|
|
952
955
|
}
|
|
@@ -957,8 +960,11 @@ export function createData(config) {
|
|
|
957
960
|
reason: event.data.reason,
|
|
958
961
|
model: event.data.model,
|
|
959
962
|
providerState: event.data.providerState,
|
|
963
|
+
providerContext: event.data.providerContext,
|
|
960
964
|
summary: event.data.text,
|
|
961
965
|
recent: event.data.recent,
|
|
966
|
+
cost: event.data.cost,
|
|
967
|
+
tokens: event.data.tokens,
|
|
962
968
|
time: { created: event.created },
|
|
963
969
|
});
|
|
964
970
|
});
|
|
@@ -979,6 +985,8 @@ export function createData(config) {
|
|
|
979
985
|
message: "Compaction failed before recording an error",
|
|
980
986
|
},
|
|
981
987
|
metadata: current?.type === "compaction" ? current.metadata : event.metadata,
|
|
988
|
+
cost: event.data.cost,
|
|
989
|
+
tokens: event.data.tokens,
|
|
982
990
|
time: current?.type === "compaction" ? current.time : { created: event.created },
|
|
983
991
|
};
|
|
984
992
|
if (current?.type === "compaction") {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@opencode/client",
|
|
4
|
-
"version": "0.0.0-dev-
|
|
4
|
+
"version": "0.0.0-dev-19386",
|
|
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/schema": "0.0.0-dev-
|
|
61
|
-
"@opencode/protocol": "0.0.0-dev-
|
|
60
|
+
"@opencode/schema": "0.0.0-dev-19386",
|
|
61
|
+
"@opencode/protocol": "0.0.0-dev-19386"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"effect": "4.0.0-rc.112",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@effect/platform-node": "4.0.0-rc.112",
|
|
77
|
-
"@opencode/httpapi-codegen": "0.0.0-dev-
|
|
77
|
+
"@opencode/httpapi-codegen": "0.0.0-dev-19386",
|
|
78
78
|
"@tsconfig/bun": "1.0.9",
|
|
79
79
|
"@types/bun": "1.4.0",
|
|
80
80
|
"@typescript/native-preview": "7.0.0-dev.20251207.1",
|