@kapishdima/ai-ledger 0.0.2
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/LICENSE +21 -0
- package/README.md +137 -0
- package/dist/cli.js +4461 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3998 -0
- package/dist/lib/db.d.ts +352 -0
- package/dist/lib/db.d.ts.map +1 -0
- package/dist/lib/format.d.ts +15 -0
- package/dist/lib/format.d.ts.map +1 -0
- package/dist/lib/providers.d.ts +29 -0
- package/dist/lib/providers.d.ts.map +1 -0
- package/dist/plugin.js +3784 -0
- package/package.json +57 -0
package/dist/lib/db.d.ts
ADDED
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
import { drizzle } from "drizzle-orm/bun-sqlite";
|
|
2
|
+
export declare const wallets: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
3
|
+
name: "wallets";
|
|
4
|
+
schema: undefined;
|
|
5
|
+
columns: {
|
|
6
|
+
id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
7
|
+
name: "id";
|
|
8
|
+
tableName: "wallets";
|
|
9
|
+
dataType: "string";
|
|
10
|
+
columnType: "SQLiteText";
|
|
11
|
+
data: string;
|
|
12
|
+
driverParam: string;
|
|
13
|
+
notNull: true;
|
|
14
|
+
hasDefault: false;
|
|
15
|
+
isPrimaryKey: true;
|
|
16
|
+
isAutoincrement: false;
|
|
17
|
+
hasRuntimeDefault: false;
|
|
18
|
+
enumValues: [string, ...string[]];
|
|
19
|
+
baseColumn: never;
|
|
20
|
+
identity: undefined;
|
|
21
|
+
generated: undefined;
|
|
22
|
+
}, {}, {
|
|
23
|
+
length: number | undefined;
|
|
24
|
+
}>;
|
|
25
|
+
name: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
26
|
+
name: "name";
|
|
27
|
+
tableName: "wallets";
|
|
28
|
+
dataType: "string";
|
|
29
|
+
columnType: "SQLiteText";
|
|
30
|
+
data: string;
|
|
31
|
+
driverParam: string;
|
|
32
|
+
notNull: true;
|
|
33
|
+
hasDefault: false;
|
|
34
|
+
isPrimaryKey: false;
|
|
35
|
+
isAutoincrement: false;
|
|
36
|
+
hasRuntimeDefault: false;
|
|
37
|
+
enumValues: [string, ...string[]];
|
|
38
|
+
baseColumn: never;
|
|
39
|
+
identity: undefined;
|
|
40
|
+
generated: undefined;
|
|
41
|
+
}, {}, {
|
|
42
|
+
length: number | undefined;
|
|
43
|
+
}>;
|
|
44
|
+
balance: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
45
|
+
name: "balance";
|
|
46
|
+
tableName: "wallets";
|
|
47
|
+
dataType: "number";
|
|
48
|
+
columnType: "SQLiteReal";
|
|
49
|
+
data: number;
|
|
50
|
+
driverParam: number;
|
|
51
|
+
notNull: true;
|
|
52
|
+
hasDefault: true;
|
|
53
|
+
isPrimaryKey: false;
|
|
54
|
+
isAutoincrement: false;
|
|
55
|
+
hasRuntimeDefault: false;
|
|
56
|
+
enumValues: undefined;
|
|
57
|
+
baseColumn: never;
|
|
58
|
+
identity: undefined;
|
|
59
|
+
generated: undefined;
|
|
60
|
+
}, {}, {}>;
|
|
61
|
+
initial_balance: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
62
|
+
name: "initial_balance";
|
|
63
|
+
tableName: "wallets";
|
|
64
|
+
dataType: "number";
|
|
65
|
+
columnType: "SQLiteReal";
|
|
66
|
+
data: number;
|
|
67
|
+
driverParam: number;
|
|
68
|
+
notNull: true;
|
|
69
|
+
hasDefault: true;
|
|
70
|
+
isPrimaryKey: false;
|
|
71
|
+
isAutoincrement: false;
|
|
72
|
+
hasRuntimeDefault: false;
|
|
73
|
+
enumValues: undefined;
|
|
74
|
+
baseColumn: never;
|
|
75
|
+
identity: undefined;
|
|
76
|
+
generated: undefined;
|
|
77
|
+
}, {}, {}>;
|
|
78
|
+
currency: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
79
|
+
name: "currency";
|
|
80
|
+
tableName: "wallets";
|
|
81
|
+
dataType: "string";
|
|
82
|
+
columnType: "SQLiteText";
|
|
83
|
+
data: string;
|
|
84
|
+
driverParam: string;
|
|
85
|
+
notNull: true;
|
|
86
|
+
hasDefault: true;
|
|
87
|
+
isPrimaryKey: false;
|
|
88
|
+
isAutoincrement: false;
|
|
89
|
+
hasRuntimeDefault: false;
|
|
90
|
+
enumValues: [string, ...string[]];
|
|
91
|
+
baseColumn: never;
|
|
92
|
+
identity: undefined;
|
|
93
|
+
generated: undefined;
|
|
94
|
+
}, {}, {
|
|
95
|
+
length: number | undefined;
|
|
96
|
+
}>;
|
|
97
|
+
updated_at: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
98
|
+
name: "updated_at";
|
|
99
|
+
tableName: "wallets";
|
|
100
|
+
dataType: "string";
|
|
101
|
+
columnType: "SQLiteText";
|
|
102
|
+
data: string;
|
|
103
|
+
driverParam: string;
|
|
104
|
+
notNull: true;
|
|
105
|
+
hasDefault: false;
|
|
106
|
+
isPrimaryKey: false;
|
|
107
|
+
isAutoincrement: false;
|
|
108
|
+
hasRuntimeDefault: false;
|
|
109
|
+
enumValues: [string, ...string[]];
|
|
110
|
+
baseColumn: never;
|
|
111
|
+
identity: undefined;
|
|
112
|
+
generated: undefined;
|
|
113
|
+
}, {}, {
|
|
114
|
+
length: number | undefined;
|
|
115
|
+
}>;
|
|
116
|
+
created_at: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
117
|
+
name: "created_at";
|
|
118
|
+
tableName: "wallets";
|
|
119
|
+
dataType: "string";
|
|
120
|
+
columnType: "SQLiteText";
|
|
121
|
+
data: string;
|
|
122
|
+
driverParam: string;
|
|
123
|
+
notNull: true;
|
|
124
|
+
hasDefault: false;
|
|
125
|
+
isPrimaryKey: false;
|
|
126
|
+
isAutoincrement: false;
|
|
127
|
+
hasRuntimeDefault: false;
|
|
128
|
+
enumValues: [string, ...string[]];
|
|
129
|
+
baseColumn: never;
|
|
130
|
+
identity: undefined;
|
|
131
|
+
generated: undefined;
|
|
132
|
+
}, {}, {
|
|
133
|
+
length: number | undefined;
|
|
134
|
+
}>;
|
|
135
|
+
};
|
|
136
|
+
dialect: "sqlite";
|
|
137
|
+
}>;
|
|
138
|
+
export declare const transactions: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
139
|
+
name: "transactions";
|
|
140
|
+
schema: undefined;
|
|
141
|
+
columns: {
|
|
142
|
+
id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
143
|
+
name: "id";
|
|
144
|
+
tableName: "transactions";
|
|
145
|
+
dataType: "string";
|
|
146
|
+
columnType: "SQLiteText";
|
|
147
|
+
data: string;
|
|
148
|
+
driverParam: string;
|
|
149
|
+
notNull: true;
|
|
150
|
+
hasDefault: false;
|
|
151
|
+
isPrimaryKey: true;
|
|
152
|
+
isAutoincrement: false;
|
|
153
|
+
hasRuntimeDefault: false;
|
|
154
|
+
enumValues: [string, ...string[]];
|
|
155
|
+
baseColumn: never;
|
|
156
|
+
identity: undefined;
|
|
157
|
+
generated: undefined;
|
|
158
|
+
}, {}, {
|
|
159
|
+
length: number | undefined;
|
|
160
|
+
}>;
|
|
161
|
+
provider: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
162
|
+
name: "provider";
|
|
163
|
+
tableName: "transactions";
|
|
164
|
+
dataType: "string";
|
|
165
|
+
columnType: "SQLiteText";
|
|
166
|
+
data: string;
|
|
167
|
+
driverParam: string;
|
|
168
|
+
notNull: true;
|
|
169
|
+
hasDefault: false;
|
|
170
|
+
isPrimaryKey: false;
|
|
171
|
+
isAutoincrement: false;
|
|
172
|
+
hasRuntimeDefault: false;
|
|
173
|
+
enumValues: [string, ...string[]];
|
|
174
|
+
baseColumn: never;
|
|
175
|
+
identity: undefined;
|
|
176
|
+
generated: undefined;
|
|
177
|
+
}, {}, {
|
|
178
|
+
length: number | undefined;
|
|
179
|
+
}>;
|
|
180
|
+
model: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
181
|
+
name: "model";
|
|
182
|
+
tableName: "transactions";
|
|
183
|
+
dataType: "string";
|
|
184
|
+
columnType: "SQLiteText";
|
|
185
|
+
data: string;
|
|
186
|
+
driverParam: string;
|
|
187
|
+
notNull: true;
|
|
188
|
+
hasDefault: false;
|
|
189
|
+
isPrimaryKey: false;
|
|
190
|
+
isAutoincrement: false;
|
|
191
|
+
hasRuntimeDefault: false;
|
|
192
|
+
enumValues: [string, ...string[]];
|
|
193
|
+
baseColumn: never;
|
|
194
|
+
identity: undefined;
|
|
195
|
+
generated: undefined;
|
|
196
|
+
}, {}, {
|
|
197
|
+
length: number | undefined;
|
|
198
|
+
}>;
|
|
199
|
+
cost: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
200
|
+
name: "cost";
|
|
201
|
+
tableName: "transactions";
|
|
202
|
+
dataType: "number";
|
|
203
|
+
columnType: "SQLiteReal";
|
|
204
|
+
data: number;
|
|
205
|
+
driverParam: number;
|
|
206
|
+
notNull: true;
|
|
207
|
+
hasDefault: false;
|
|
208
|
+
isPrimaryKey: false;
|
|
209
|
+
isAutoincrement: false;
|
|
210
|
+
hasRuntimeDefault: false;
|
|
211
|
+
enumValues: undefined;
|
|
212
|
+
baseColumn: never;
|
|
213
|
+
identity: undefined;
|
|
214
|
+
generated: undefined;
|
|
215
|
+
}, {}, {}>;
|
|
216
|
+
input_tokens: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
217
|
+
name: "input_tokens";
|
|
218
|
+
tableName: "transactions";
|
|
219
|
+
dataType: "number";
|
|
220
|
+
columnType: "SQLiteInteger";
|
|
221
|
+
data: number;
|
|
222
|
+
driverParam: number;
|
|
223
|
+
notNull: false;
|
|
224
|
+
hasDefault: false;
|
|
225
|
+
isPrimaryKey: false;
|
|
226
|
+
isAutoincrement: false;
|
|
227
|
+
hasRuntimeDefault: false;
|
|
228
|
+
enumValues: undefined;
|
|
229
|
+
baseColumn: never;
|
|
230
|
+
identity: undefined;
|
|
231
|
+
generated: undefined;
|
|
232
|
+
}, {}, {}>;
|
|
233
|
+
output_tokens: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
234
|
+
name: "output_tokens";
|
|
235
|
+
tableName: "transactions";
|
|
236
|
+
dataType: "number";
|
|
237
|
+
columnType: "SQLiteInteger";
|
|
238
|
+
data: number;
|
|
239
|
+
driverParam: number;
|
|
240
|
+
notNull: false;
|
|
241
|
+
hasDefault: false;
|
|
242
|
+
isPrimaryKey: false;
|
|
243
|
+
isAutoincrement: false;
|
|
244
|
+
hasRuntimeDefault: false;
|
|
245
|
+
enumValues: undefined;
|
|
246
|
+
baseColumn: never;
|
|
247
|
+
identity: undefined;
|
|
248
|
+
generated: undefined;
|
|
249
|
+
}, {}, {}>;
|
|
250
|
+
session_id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
251
|
+
name: "session_id";
|
|
252
|
+
tableName: "transactions";
|
|
253
|
+
dataType: "string";
|
|
254
|
+
columnType: "SQLiteText";
|
|
255
|
+
data: string;
|
|
256
|
+
driverParam: string;
|
|
257
|
+
notNull: false;
|
|
258
|
+
hasDefault: false;
|
|
259
|
+
isPrimaryKey: false;
|
|
260
|
+
isAutoincrement: false;
|
|
261
|
+
hasRuntimeDefault: false;
|
|
262
|
+
enumValues: [string, ...string[]];
|
|
263
|
+
baseColumn: never;
|
|
264
|
+
identity: undefined;
|
|
265
|
+
generated: undefined;
|
|
266
|
+
}, {}, {
|
|
267
|
+
length: number | undefined;
|
|
268
|
+
}>;
|
|
269
|
+
created_at: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
270
|
+
name: "created_at";
|
|
271
|
+
tableName: "transactions";
|
|
272
|
+
dataType: "string";
|
|
273
|
+
columnType: "SQLiteText";
|
|
274
|
+
data: string;
|
|
275
|
+
driverParam: string;
|
|
276
|
+
notNull: true;
|
|
277
|
+
hasDefault: false;
|
|
278
|
+
isPrimaryKey: false;
|
|
279
|
+
isAutoincrement: false;
|
|
280
|
+
hasRuntimeDefault: false;
|
|
281
|
+
enumValues: [string, ...string[]];
|
|
282
|
+
baseColumn: never;
|
|
283
|
+
identity: undefined;
|
|
284
|
+
generated: undefined;
|
|
285
|
+
}, {}, {
|
|
286
|
+
length: number | undefined;
|
|
287
|
+
}>;
|
|
288
|
+
synced: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
289
|
+
name: "synced";
|
|
290
|
+
tableName: "transactions";
|
|
291
|
+
dataType: "number";
|
|
292
|
+
columnType: "SQLiteInteger";
|
|
293
|
+
data: number;
|
|
294
|
+
driverParam: number;
|
|
295
|
+
notNull: false;
|
|
296
|
+
hasDefault: true;
|
|
297
|
+
isPrimaryKey: false;
|
|
298
|
+
isAutoincrement: false;
|
|
299
|
+
hasRuntimeDefault: false;
|
|
300
|
+
enumValues: undefined;
|
|
301
|
+
baseColumn: never;
|
|
302
|
+
identity: undefined;
|
|
303
|
+
generated: undefined;
|
|
304
|
+
}, {}, {}>;
|
|
305
|
+
};
|
|
306
|
+
dialect: "sqlite";
|
|
307
|
+
}>;
|
|
308
|
+
export declare function getDb(): ReturnType<typeof drizzle>;
|
|
309
|
+
export declare function initializeDatabase(): Promise<void>;
|
|
310
|
+
export declare function insertWallet(data: {
|
|
311
|
+
id: string;
|
|
312
|
+
name: string;
|
|
313
|
+
balance: number;
|
|
314
|
+
initial_balance: number;
|
|
315
|
+
currency: string;
|
|
316
|
+
}): Promise<void>;
|
|
317
|
+
export declare function updateWallet(data: {
|
|
318
|
+
id: string;
|
|
319
|
+
balance: number;
|
|
320
|
+
}): Promise<void>;
|
|
321
|
+
export declare function getWallet(provider: string): Promise<{
|
|
322
|
+
id: string;
|
|
323
|
+
name: string;
|
|
324
|
+
balance: number;
|
|
325
|
+
initial_balance: number;
|
|
326
|
+
currency: string;
|
|
327
|
+
updated_at: string;
|
|
328
|
+
created_at: string;
|
|
329
|
+
} | null>;
|
|
330
|
+
export declare function getAllWallets(): Promise<{
|
|
331
|
+
id: string;
|
|
332
|
+
name: string;
|
|
333
|
+
balance: number;
|
|
334
|
+
initial_balance: number;
|
|
335
|
+
currency: string;
|
|
336
|
+
updated_at: string;
|
|
337
|
+
created_at: string;
|
|
338
|
+
}[]>;
|
|
339
|
+
export declare function insertTransaction(data: {
|
|
340
|
+
id: string;
|
|
341
|
+
provider: string;
|
|
342
|
+
model: string;
|
|
343
|
+
cost: number;
|
|
344
|
+
input_tokens?: number;
|
|
345
|
+
output_tokens?: number;
|
|
346
|
+
session_id?: string;
|
|
347
|
+
created_at: string;
|
|
348
|
+
synced: number;
|
|
349
|
+
}): Promise<void>;
|
|
350
|
+
export declare function deductBalance(provider: string, cost: number): Promise<number>;
|
|
351
|
+
export declare function walletExists(provider: string): Promise<boolean>;
|
|
352
|
+
//# sourceMappingURL=db.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"db.d.ts","sourceRoot":"","sources":["../../lib/db.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAOjD,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQlB,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUvB,CAAC;AAYH,wBAAgB,KAAK,IAAI,UAAU,CAAC,OAAO,OAAO,CAAC,CAUlD;AAED,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CA4BxD;AAED,wBAAsB,YAAY,CAAC,IAAI,EAAE;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;CAClB,GAAG,OAAO,CAAC,IAAI,CAAC,CAahB;AAED,wBAAsB,YAAY,CAAC,IAAI,EAAE;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;CACjB,GAAG,OAAO,CAAC,IAAI,CAAC,CAWhB;AAED,wBAAsB,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;IACzD,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,GAAG,IAAI,CAAC,CAUR;AAED,wBAAsB,aAAa,IAAI,OAAO,CAC5C;IACE,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,EAAE,CACJ,CAIA;AAED,wBAAsB,iBAAiB,CAAC,IAAI,EAAE;IAC5C,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,IAAI,CAAC,CAchB;AAED,wBAAsB,aAAa,CACjC,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,CAAC,CAkBjB;AAED,wBAAsB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAGrE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface Wallet {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
balance: number;
|
|
5
|
+
initialBalance: number;
|
|
6
|
+
currency: string;
|
|
7
|
+
updatedAt: string;
|
|
8
|
+
createdAt: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function formatCurrency(amount: number): string;
|
|
11
|
+
export declare function formatProgressBar(spent: number, initial: number): string;
|
|
12
|
+
export declare function formatBalanceTable(wallets: Wallet[]): string;
|
|
13
|
+
export declare function formatLedgerSetInstructions(providers: string[]): string;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=format.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../lib/format.ts"],"names":[],"mappings":"AAAA,UAAU,MAAM;IACd,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,cAAc,EAAE,MAAM,CAAA;IACtB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAGrD;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAQxE;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,CAuE5D;AAED,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,MAAM,CAiBvE"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
declare const PROVIDER_ENV: {
|
|
2
|
+
readonly openai: {
|
|
3
|
+
readonly envVar: "OPENAI_API_KEY";
|
|
4
|
+
readonly name: "OpenAI";
|
|
5
|
+
readonly currency: "USD";
|
|
6
|
+
};
|
|
7
|
+
readonly anthropic: {
|
|
8
|
+
readonly envVar: "ANTHROPIC_API_KEY";
|
|
9
|
+
readonly name: "Anthropic";
|
|
10
|
+
readonly currency: "USD";
|
|
11
|
+
};
|
|
12
|
+
readonly kimi: {
|
|
13
|
+
readonly envVar: "MOONSHOT_API_KEY";
|
|
14
|
+
readonly name: "Kimi";
|
|
15
|
+
readonly currency: "USD";
|
|
16
|
+
};
|
|
17
|
+
readonly minimax: {
|
|
18
|
+
readonly envVar: "MINIMAX_API_KEY";
|
|
19
|
+
readonly name: "MiniMax";
|
|
20
|
+
readonly currency: "USD";
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export type ProviderId = keyof typeof PROVIDER_ENV;
|
|
24
|
+
export declare function detectProviders(): string[];
|
|
25
|
+
export declare function getProviderName(providerId: string): string;
|
|
26
|
+
export declare function getProviderCurrency(providerId: string): string;
|
|
27
|
+
export declare function getProviderEnvVar(providerId: string): string;
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=providers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../lib/providers.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;CASR,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,YAAY,CAAC;AAEnD,wBAAgB,eAAe,IAAI,MAAM,EAAE,CAI1C;AAED,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAE9D;AAED,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAK5D"}
|