@opencode/client 0.0.0-beta-19381 → 0.0.0-beta-19398
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 = {
|
|
@@ -2056,6 +2060,7 @@ export type ProviderInfo = {
|
|
|
2056
2060
|
activation: "auto" | "enabled" | "disabled";
|
|
2057
2061
|
package: string;
|
|
2058
2062
|
compaction?: ProviderCompaction;
|
|
2063
|
+
websocket?: boolean;
|
|
2059
2064
|
settings?: {
|
|
2060
2065
|
[x: string]: any;
|
|
2061
2066
|
};
|
|
@@ -2490,6 +2495,8 @@ export type SessionMessageCompactionCompleted = {
|
|
|
2490
2495
|
summary: string;
|
|
2491
2496
|
recent: string;
|
|
2492
2497
|
providerContext?: SessionProviderContext;
|
|
2498
|
+
cost?: MoneyUSD;
|
|
2499
|
+
tokens?: TokenUsageInfo;
|
|
2493
2500
|
};
|
|
2494
2501
|
export type SessionCompactionEnded = {
|
|
2495
2502
|
id: string;
|
|
@@ -2512,6 +2519,8 @@ export type SessionCompactionEnded = {
|
|
|
2512
2519
|
providerContext?: SessionProviderContext;
|
|
2513
2520
|
text: string;
|
|
2514
2521
|
recent: string;
|
|
2522
|
+
cost?: MoneyUSD;
|
|
2523
|
+
tokens?: TokenUsageInfo;
|
|
2515
2524
|
};
|
|
2516
2525
|
};
|
|
2517
2526
|
export type SessionForked = {
|
|
@@ -2619,6 +2628,7 @@ export type ModelInfo = {
|
|
|
2619
2628
|
compatibility?: ModelCompatibility;
|
|
2620
2629
|
package?: string;
|
|
2621
2630
|
compaction?: ProviderCompaction;
|
|
2631
|
+
websocket?: boolean;
|
|
2622
2632
|
settings?: {
|
|
2623
2633
|
[x: string]: any;
|
|
2624
2634
|
};
|
|
@@ -2868,6 +2878,7 @@ export type ConfigEntry = {
|
|
|
2868
2878
|
providers?: {
|
|
2869
2879
|
[x: string]: {
|
|
2870
2880
|
compaction?: ProviderCompaction;
|
|
2881
|
+
websocket?: boolean;
|
|
2871
2882
|
canonical?: string;
|
|
2872
2883
|
name?: string;
|
|
2873
2884
|
env?: Array<string>;
|
|
@@ -2884,6 +2895,7 @@ export type ConfigEntry = {
|
|
|
2884
2895
|
models?: {
|
|
2885
2896
|
[x: string]: {
|
|
2886
2897
|
compaction?: ProviderCompaction;
|
|
2898
|
+
websocket?: boolean;
|
|
2887
2899
|
modelID?: string;
|
|
2888
2900
|
family?: string;
|
|
2889
2901
|
name?: string;
|
|
@@ -4116,6 +4128,16 @@ export type SessionImportInput = {
|
|
|
4116
4128
|
};
|
|
4117
4129
|
readonly messages: JsonValue;
|
|
4118
4130
|
};
|
|
4131
|
+
readonly cost?: number;
|
|
4132
|
+
readonly tokens?: {
|
|
4133
|
+
readonly input: number;
|
|
4134
|
+
readonly output: number;
|
|
4135
|
+
readonly reasoning: number;
|
|
4136
|
+
readonly cache: {
|
|
4137
|
+
readonly read: number;
|
|
4138
|
+
readonly write: number;
|
|
4139
|
+
};
|
|
4140
|
+
};
|
|
4119
4141
|
} | {
|
|
4120
4142
|
readonly type: "compaction";
|
|
4121
4143
|
readonly id: string;
|
|
@@ -4132,6 +4154,16 @@ export type SessionImportInput = {
|
|
|
4132
4154
|
readonly message: string;
|
|
4133
4155
|
readonly status?: number;
|
|
4134
4156
|
};
|
|
4157
|
+
readonly cost?: number;
|
|
4158
|
+
readonly tokens?: {
|
|
4159
|
+
readonly input: number;
|
|
4160
|
+
readonly output: number;
|
|
4161
|
+
readonly reasoning: number;
|
|
4162
|
+
readonly cache: {
|
|
4163
|
+
readonly read: number;
|
|
4164
|
+
readonly write: number;
|
|
4165
|
+
};
|
|
4166
|
+
};
|
|
4135
4167
|
})>;
|
|
4136
4168
|
readonly location?: {
|
|
4137
4169
|
readonly directory: string;
|
|
@@ -4554,6 +4586,16 @@ export type SessionImportInput = {
|
|
|
4554
4586
|
};
|
|
4555
4587
|
readonly messages: JsonValue;
|
|
4556
4588
|
};
|
|
4589
|
+
readonly cost?: number;
|
|
4590
|
+
readonly tokens?: {
|
|
4591
|
+
readonly input: number;
|
|
4592
|
+
readonly output: number;
|
|
4593
|
+
readonly reasoning: number;
|
|
4594
|
+
readonly cache: {
|
|
4595
|
+
readonly read: number;
|
|
4596
|
+
readonly write: number;
|
|
4597
|
+
};
|
|
4598
|
+
};
|
|
4557
4599
|
} | {
|
|
4558
4600
|
readonly type: "compaction";
|
|
4559
4601
|
readonly id: string;
|
|
@@ -4570,6 +4612,16 @@ export type SessionImportInput = {
|
|
|
4570
4612
|
readonly message: string;
|
|
4571
4613
|
readonly status?: number;
|
|
4572
4614
|
};
|
|
4615
|
+
readonly cost?: number;
|
|
4616
|
+
readonly tokens?: {
|
|
4617
|
+
readonly input: number;
|
|
4618
|
+
readonly output: number;
|
|
4619
|
+
readonly reasoning: number;
|
|
4620
|
+
readonly cache: {
|
|
4621
|
+
readonly read: number;
|
|
4622
|
+
readonly write: number;
|
|
4623
|
+
};
|
|
4624
|
+
};
|
|
4573
4625
|
})>;
|
|
4574
4626
|
readonly location?: {
|
|
4575
4627
|
readonly directory: string;
|
|
@@ -4992,6 +5044,16 @@ export type SessionImportInput = {
|
|
|
4992
5044
|
};
|
|
4993
5045
|
readonly messages: JsonValue;
|
|
4994
5046
|
};
|
|
5047
|
+
readonly cost?: number;
|
|
5048
|
+
readonly tokens?: {
|
|
5049
|
+
readonly input: number;
|
|
5050
|
+
readonly output: number;
|
|
5051
|
+
readonly reasoning: number;
|
|
5052
|
+
readonly cache: {
|
|
5053
|
+
readonly read: number;
|
|
5054
|
+
readonly write: number;
|
|
5055
|
+
};
|
|
5056
|
+
};
|
|
4995
5057
|
} | {
|
|
4996
5058
|
readonly type: "compaction";
|
|
4997
5059
|
readonly id: string;
|
|
@@ -5008,6 +5070,16 @@ export type SessionImportInput = {
|
|
|
5008
5070
|
readonly message: string;
|
|
5009
5071
|
readonly status?: number;
|
|
5010
5072
|
};
|
|
5073
|
+
readonly cost?: number;
|
|
5074
|
+
readonly tokens?: {
|
|
5075
|
+
readonly input: number;
|
|
5076
|
+
readonly output: number;
|
|
5077
|
+
readonly reasoning: number;
|
|
5078
|
+
readonly cache: {
|
|
5079
|
+
readonly read: number;
|
|
5080
|
+
readonly write: number;
|
|
5081
|
+
};
|
|
5082
|
+
};
|
|
5011
5083
|
})>;
|
|
5012
5084
|
readonly location?: {
|
|
5013
5085
|
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-beta-
|
|
4
|
+
"version": "0.0.0-beta-19398",
|
|
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-beta-
|
|
61
|
-
"@opencode/protocol": "0.0.0-beta-
|
|
60
|
+
"@opencode/schema": "0.0.0-beta-19398",
|
|
61
|
+
"@opencode/protocol": "0.0.0-beta-19398"
|
|
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-beta-
|
|
77
|
+
"@opencode/httpapi-codegen": "0.0.0-beta-19398",
|
|
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",
|