@versini/sassysaint-common 4.1.0 → 4.2.0
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/index.d.ts +4 -4
- package/dist/index.js +32 -32
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
@@ -20,7 +20,7 @@ declare const ALL_PROVIDERS: readonly ["OpenAI", "Anthropic", "Google"];
|
|
20
20
|
/**
|
21
21
|
* List of available models TODAY.
|
22
22
|
*/
|
23
|
-
declare const
|
23
|
+
declare const MODEL_GPT = "gpt-5";
|
24
24
|
declare const MODEL_GPT4_MINI = "gpt-4.1-nano";
|
25
25
|
declare const MODEL_O4_MINI = "o4-mini";
|
26
26
|
declare const MODEL_CLAUDE_HAIKU = "claude-3-5-haiku-20241022";
|
@@ -32,13 +32,13 @@ declare const MODEL_SONAR_PRO = "sonar-pro";
|
|
32
32
|
/**
|
33
33
|
* List of all models available TODAY.
|
34
34
|
*/
|
35
|
-
declare const ALL_MODELS: readonly ["gpt-
|
35
|
+
declare const ALL_MODELS: readonly ["gpt-5", "gpt-4.1-nano", "o4-mini", "claude-3-5-haiku-20241022", "claude-sonnet-4-20250514", "gemini-2.5-flash", "gemini-2.5-pro", "sonar", "sonar-pro"];
|
36
36
|
declare const ALL_REASONING_MODELS: string[];
|
37
37
|
/**
|
38
38
|
* List of models available according to the providers.
|
39
39
|
*/
|
40
40
|
declare const MODELS_PER_PROVIDER: {
|
41
|
-
readonly OpenAI: readonly ["gpt-4.1-nano", "gpt-
|
41
|
+
readonly OpenAI: readonly ["gpt-4.1-nano", "gpt-5"];
|
42
42
|
readonly Anthropic: readonly ["claude-3-5-haiku-20241022", "claude-sonnet-4-20250514"];
|
43
43
|
readonly Google: readonly ["gemini-2.5-flash", "gemini-2.5-pro"];
|
44
44
|
readonly Perplexity: readonly ["sonar", "sonar-pro"];
|
@@ -290,4 +290,4 @@ declare namespace index {
|
|
290
290
|
export { type index_ClientCryptoKeyPair as ClientCryptoKeyPair, type index_CryptoConfig as CryptoConfig, index_CryptoError as CryptoError, type index_CryptoSession as CryptoSession, index_DEFAULT_CRYPTO_CONFIG as DEFAULT_CRYPTO_CONFIG, type index_EncryptedMessage as EncryptedMessage, type index_KeyExchangeResponse as KeyExchangeResponse, type index_RSAKeyGenParams as RSAKeyGenParams, type index_SerializablePublicKey as SerializablePublicKey, index_arrayBufferToBase64 as arrayBufferToBase64, index_base64ToArrayBuffer as base64ToArrayBuffer, index_canUseEncryption as canUseEncryption, index_debugLog as debugLog, index_decryptFromServer as decryptFromServer, index_encryptForServer as encryptForServer, index_establishCryptoSession as establishCryptoSession, index_exportPublicKey as exportPublicKey, index_generateClientKeyPair as generateClientKeyPair, index_generateDeviceId as generateDeviceId, index_importServerPublicKey as importServerPublicKey, index_isCryptoSessionValid as isCryptoSessionValid, index_isSecureContext as isSecureContext, index_isWebCryptoSupported as isWebCryptoSupported, index_safeParse as safeParse, index_safeStringify as safeStringify };
|
291
291
|
}
|
292
292
|
|
293
|
-
export { ALL_MODELS, ALL_PROVIDERS, ALL_REASONING_MODELS, APPLICATION_NAME, CALLISTO_CHAT_ID_HEADER, DEFAULT_PROVIDER, MODELS_PER_PROVIDER, MODEL_CLAUDE_HAIKU, MODEL_CLAUDE_SONNET, MODEL_GEMINI_FLASH, MODEL_GEMINI_PRO,
|
293
|
+
export { ALL_MODELS, ALL_PROVIDERS, ALL_REASONING_MODELS, APPLICATION_NAME, CALLISTO_CHAT_ID_HEADER, DEFAULT_PROVIDER, MODELS_PER_PROVIDER, MODEL_CLAUDE_HAIKU, MODEL_CLAUDE_SONNET, MODEL_GEMINI_FLASH, MODEL_GEMINI_PRO, MODEL_GPT, MODEL_GPT4_MINI, MODEL_O4_MINI, MODEL_SONAR, MODEL_SONAR_PRO, PLAN_FREE, PLAN_PLUS, PLAN_PREMIUM, POLICY_GRANTS, PROVIDER_ANTHROPIC, PROVIDER_GOOGLE, PROVIDER_MEMORY, PROVIDER_OPENAI, PROVIDER_PERPLEXITY, PROVIDER_ROLE_MAP, PROVIDER_SUMMARY, ROLE_ASSISTANT, ROLE_HIDDEN, ROLE_INTERNAL, ROLE_SYSTEM, ROLE_USER, SORT_BY_TIMESTAMP, SORT_BY_TOKEN_USAGE, index as crypto, findProvider };
|
package/dist/index.js
CHANGED
@@ -1,22 +1,22 @@
|
|
1
|
-
const
|
1
|
+
const w = "system", s = "user", c = "assistant", te = "hidden", re = "data", a = "OpenAI", i = "Anthropic", E = "Google", M = "Summary", g = "Memory", d = "Perplexity", ne = a, oe = [
|
2
2
|
a,
|
3
3
|
i,
|
4
4
|
E
|
5
|
-
],
|
5
|
+
], u = "gpt-5", _ = "gpt-4.1-nano", m = "o4-mini", l = "claude-3-5-haiku-20241022", A = "claude-sonnet-4-20250514", f = "gemini-2.5-flash", p = "gemini-2.5-pro", R = "sonar", P = "sonar-pro", se = [
|
6
|
+
u,
|
6
7
|
_,
|
8
|
+
m,
|
7
9
|
l,
|
8
|
-
u,
|
9
|
-
f,
|
10
10
|
A,
|
11
|
-
|
11
|
+
f,
|
12
12
|
p,
|
13
|
-
|
14
|
-
|
13
|
+
R,
|
14
|
+
P
|
15
15
|
], ce = [
|
16
16
|
u,
|
17
17
|
A,
|
18
18
|
p
|
19
|
-
], b = "claude-sonnet-4", h = "claude-3", T = "gpt-
|
19
|
+
], b = "claude-sonnet-4", h = "claude-3", T = "gpt-", N = "o3", v = "o4", K = "gemini", C = "sonar", U = {
|
20
20
|
[i]: [
|
21
21
|
b,
|
22
22
|
h
|
@@ -29,15 +29,15 @@ const M = "system", s = "user", c = "assistant", te = "hidden", re = "data", a =
|
|
29
29
|
[E]: [K],
|
30
30
|
[d]: [C]
|
31
31
|
}, ae = {
|
32
|
-
[a]: [
|
33
|
-
[i]: [
|
34
|
-
[E]: [
|
35
|
-
[d]: [
|
32
|
+
[a]: [_, u],
|
33
|
+
[i]: [l, A],
|
34
|
+
[E]: [f, p],
|
35
|
+
[d]: [R, P]
|
36
36
|
}, ie = {
|
37
|
-
[a]: [
|
37
|
+
[a]: [w, s, c],
|
38
38
|
[i]: [s, c],
|
39
|
+
[M]: [s, c],
|
39
40
|
[g]: [s, c],
|
40
|
-
[m]: [s, c],
|
41
41
|
[E]: [s, c],
|
42
42
|
[d]: [s, c]
|
43
43
|
}, k = "sassy:free", F = "sassy:plus", G = "sassy:advanced", V = "sassy:advanced:reasoning", Ee = {
|
@@ -58,12 +58,12 @@ class o extends Error {
|
|
58
58
|
super(e), this.code = n, this.originalError = t, this.name = "CryptoError";
|
59
59
|
}
|
60
60
|
}
|
61
|
-
const
|
61
|
+
const S = {
|
62
62
|
keySize: 4096,
|
63
63
|
debug: !1
|
64
64
|
};
|
65
65
|
async function Y(r = {}) {
|
66
|
-
const e = { ...
|
66
|
+
const e = { ...S, ...r };
|
67
67
|
try {
|
68
68
|
const n = {
|
69
69
|
modulusLength: e.keySize,
|
@@ -114,7 +114,7 @@ async function x(r) {
|
|
114
114
|
);
|
115
115
|
}
|
116
116
|
}
|
117
|
-
async function
|
117
|
+
async function I(r) {
|
118
118
|
try {
|
119
119
|
const e = JSON.parse(r);
|
120
120
|
return await crypto.subtle.importKey(
|
@@ -183,7 +183,7 @@ async function H(r, e) {
|
|
183
183
|
}
|
184
184
|
async function $(r, e, n) {
|
185
185
|
try {
|
186
|
-
const t = await
|
186
|
+
const t = await I(
|
187
187
|
r.serverPublicKey
|
188
188
|
);
|
189
189
|
return {
|
@@ -214,14 +214,14 @@ function B() {
|
|
214
214
|
const n = Array.from(e).map((t) => t.toString(36)).join("");
|
215
215
|
return `device_${r}_${n}`;
|
216
216
|
}
|
217
|
-
function
|
217
|
+
function L() {
|
218
218
|
return typeof window < "u" && typeof window.crypto < "u" && typeof window.crypto.subtle < "u";
|
219
219
|
}
|
220
|
-
function
|
220
|
+
function D() {
|
221
221
|
return typeof window < "u" && (window.isSecureContext || window.location.protocol === "https:");
|
222
222
|
}
|
223
223
|
function z() {
|
224
|
-
return
|
224
|
+
return L() && D();
|
225
225
|
}
|
226
226
|
function J(r) {
|
227
227
|
const e = new Uint8Array(r);
|
@@ -253,7 +253,7 @@ function Q(r) {
|
|
253
253
|
function Z(r, ...e) {
|
254
254
|
typeof process < "u" && process.env && process.env.NODE_ENV === "development" && console.info(`🔐 [Crypto] ${r}`, ...e);
|
255
255
|
}
|
256
|
-
const Oe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, CryptoError: o, DEFAULT_CRYPTO_CONFIG:
|
256
|
+
const Oe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, CryptoError: o, DEFAULT_CRYPTO_CONFIG: S, arrayBufferToBase64: J, base64ToArrayBuffer: W, canUseEncryption: z, debugLog: Z, decryptFromServer: H, encryptForServer: X, establishCryptoSession: $, exportPublicKey: x, generateClientKeyPair: Y, generateDeviceId: B, importServerPublicKey: I, isCryptoSessionValid: j, isSecureContext: D, isWebCryptoSupported: L, safeParse: Q, safeStringify: q }, Symbol.toStringTag, { value: "Module" }));
|
257
257
|
export {
|
258
258
|
se as ALL_MODELS,
|
259
259
|
oe as ALL_PROVIDERS,
|
@@ -262,30 +262,30 @@ export {
|
|
262
262
|
ye as CALLISTO_CHAT_ID_HEADER,
|
263
263
|
ne as DEFAULT_PROVIDER,
|
264
264
|
ae as MODELS_PER_PROVIDER,
|
265
|
-
|
265
|
+
l as MODEL_CLAUDE_HAIKU,
|
266
266
|
A as MODEL_CLAUDE_SONNET,
|
267
|
-
|
267
|
+
f as MODEL_GEMINI_FLASH,
|
268
268
|
p as MODEL_GEMINI_PRO,
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
269
|
+
u as MODEL_GPT,
|
270
|
+
_ as MODEL_GPT4_MINI,
|
271
|
+
m as MODEL_O4_MINI,
|
272
|
+
R as MODEL_SONAR,
|
273
|
+
P as MODEL_SONAR_PRO,
|
274
274
|
k as PLAN_FREE,
|
275
275
|
F as PLAN_PLUS,
|
276
276
|
G as PLAN_PREMIUM,
|
277
277
|
Ee as POLICY_GRANTS,
|
278
278
|
i as PROVIDER_ANTHROPIC,
|
279
279
|
E as PROVIDER_GOOGLE,
|
280
|
-
|
280
|
+
g as PROVIDER_MEMORY,
|
281
281
|
a as PROVIDER_OPENAI,
|
282
282
|
d as PROVIDER_PERPLEXITY,
|
283
283
|
ie as PROVIDER_ROLE_MAP,
|
284
|
-
|
284
|
+
M as PROVIDER_SUMMARY,
|
285
285
|
c as ROLE_ASSISTANT,
|
286
286
|
te as ROLE_HIDDEN,
|
287
287
|
re as ROLE_INTERNAL,
|
288
|
-
|
288
|
+
w as ROLE_SYSTEM,
|
289
289
|
s as ROLE_USER,
|
290
290
|
ue as SORT_BY_TIMESTAMP,
|
291
291
|
Ae as SORT_BY_TOKEN_USAGE,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@versini/sassysaint-common",
|
3
|
-
"version": "4.
|
3
|
+
"version": "4.2.0",
|
4
4
|
"license": "MIT",
|
5
5
|
"author": "Arno Versini",
|
6
6
|
"publishConfig": {
|
@@ -30,5 +30,5 @@
|
|
30
30
|
"test:watch": "vitest",
|
31
31
|
"watch": "npm-run-all dev"
|
32
32
|
},
|
33
|
-
"gitHead": "
|
33
|
+
"gitHead": "e846a9619cd9510aa7a7d8bf0395b2f8a4b29d4c"
|
34
34
|
}
|