@versini/sassysaint-common 3.1.0 → 3.1.1
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 +5 -4
- package/dist/index.js +29 -28
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
@@ -20,8 +20,9 @@ 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_GPT4 = "gpt-4.1";
|
24
24
|
declare const MODEL_GPT4_MINI = "gpt-4.1-nano";
|
25
|
+
declare const MODEL_O4_MINI = "o4-mini";
|
25
26
|
declare const MODEL_CLAUDE_HAIKU = "claude-3-5-haiku-latest";
|
26
27
|
declare const MODEL_CLAUDE_SONNET = "claude-sonnet-4-20250514";
|
27
28
|
declare const MODEL_GEMINI_FLASH = "gemini-2.5-flash-preview-05-20";
|
@@ -31,13 +32,13 @@ declare const MODEL_SONAR_PRO = "sonar-pro";
|
|
31
32
|
/**
|
32
33
|
* List of all models available TODAY.
|
33
34
|
*/
|
34
|
-
declare const ALL_MODELS: readonly ["gpt-
|
35
|
+
declare const ALL_MODELS: readonly ["gpt-4.1", "gpt-4.1-nano", "o4-mini", "claude-3-5-haiku-latest", "claude-sonnet-4-20250514", "gemini-2.5-flash-preview-05-20", "gemini-2.5-pro", "sonar", "sonar-pro"];
|
35
36
|
declare const ALL_REASONING_MODELS: string[];
|
36
37
|
/**
|
37
38
|
* List of models available according to the providers.
|
38
39
|
*/
|
39
40
|
declare const MODELS_PER_PROVIDER: {
|
40
|
-
readonly OpenAI: readonly ["gpt-4.1-nano", "gpt-
|
41
|
+
readonly OpenAI: readonly ["gpt-4.1-nano", "gpt-4.1", "o4-mini"];
|
41
42
|
readonly Anthropic: readonly ["claude-3-5-haiku-latest", "claude-sonnet-4-20250514"];
|
42
43
|
readonly Google: readonly ["gemini-2.5-flash-preview-05-20", "gemini-2.5-pro"];
|
43
44
|
readonly Perplexity: readonly ["sonar", "sonar-pro"];
|
@@ -279,4 +280,4 @@ declare namespace index {
|
|
279
280
|
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 };
|
280
281
|
}
|
281
282
|
|
282
|
-
export { ALL_MODELS, ALL_PROVIDERS, ALL_REASONING_MODELS, CALLISTO_CHAT_ID_HEADER, DEFAULT_PROVIDER, MODELS_PER_PROVIDER, MODEL_CLAUDE_HAIKU, MODEL_CLAUDE_SONNET, MODEL_GEMINI_FLASH, MODEL_GEMINI_PRO, MODEL_GPT4_MINI,
|
283
|
+
export { ALL_MODELS, ALL_PROVIDERS, ALL_REASONING_MODELS, CALLISTO_CHAT_ID_HEADER, DEFAULT_PROVIDER, MODELS_PER_PROVIDER, MODEL_CLAUDE_HAIKU, MODEL_CLAUDE_SONNET, MODEL_GEMINI_FLASH, MODEL_GEMINI_PRO, MODEL_GPT4, 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, index as crypto, findProvider };
|
package/dist/index.js
CHANGED
@@ -1,43 +1,43 @@
|
|
1
|
-
const
|
1
|
+
const g = "system", s = "user", c = "assistant", ee = "hidden", te = "data", a = "OpenAI", i = "Anthropic", y = "Google", M = "Summary", m = "Memory", d = "Perplexity", re = a, ne = [
|
2
2
|
a,
|
3
3
|
i,
|
4
4
|
y
|
5
|
-
],
|
5
|
+
], _ = "gpt-4.1", l = "gpt-4.1-nano", u = "o4-mini", f = "claude-3-5-haiku-latest", p = "claude-sonnet-4-20250514", R = "gemini-2.5-flash-preview-05-20", A = "gemini-2.5-pro", P = "sonar", I = "sonar-pro", b = "claude-sonnet-4", h = "claude-3", T = "gpt-4", N = "o3", v = "o4", K = "gemini", C = "sonar", U = {
|
6
6
|
[i]: [
|
7
7
|
b,
|
8
8
|
h
|
9
9
|
],
|
10
10
|
[a]: [
|
11
11
|
T,
|
12
|
-
m,
|
13
12
|
N,
|
14
13
|
v
|
15
14
|
],
|
16
15
|
[y]: [K],
|
17
16
|
[d]: [C]
|
18
17
|
}, oe = [
|
19
|
-
u,
|
20
18
|
_,
|
21
19
|
l,
|
22
|
-
|
20
|
+
u,
|
23
21
|
f,
|
22
|
+
p,
|
23
|
+
R,
|
24
24
|
A,
|
25
25
|
P,
|
26
|
-
|
26
|
+
I
|
27
27
|
], se = [
|
28
28
|
u,
|
29
29
|
p,
|
30
30
|
A
|
31
31
|
], ce = {
|
32
|
-
[a]: [_, u],
|
33
|
-
[i]: [
|
34
|
-
[y]: [
|
35
|
-
[d]: [P,
|
32
|
+
[a]: [l, _, u],
|
33
|
+
[i]: [f, p],
|
34
|
+
[y]: [R, A],
|
35
|
+
[d]: [P, I]
|
36
36
|
}, ae = {
|
37
|
-
[a]: [
|
37
|
+
[a]: [g, s, c],
|
38
38
|
[i]: [s, c],
|
39
|
-
[g]: [s, c],
|
40
39
|
[M]: [s, c],
|
40
|
+
[m]: [s, c],
|
41
41
|
[y]: [s, c],
|
42
42
|
[d]: [s, c]
|
43
43
|
}, k = "sassy:free", F = "sassy:plus", G = "sassy:advanced", ie = {
|
@@ -114,7 +114,7 @@ async function x(r) {
|
|
114
114
|
);
|
115
115
|
}
|
116
116
|
}
|
117
|
-
async function
|
117
|
+
async function D(r) {
|
118
118
|
try {
|
119
119
|
const e = JSON.parse(r);
|
120
120
|
return await crypto.subtle.importKey(
|
@@ -160,7 +160,7 @@ async function Y(r, e, n) {
|
|
160
160
|
);
|
161
161
|
}
|
162
162
|
}
|
163
|
-
async function
|
163
|
+
async function H(r, e) {
|
164
164
|
try {
|
165
165
|
const n = Uint8Array.from(
|
166
166
|
atob(r.data),
|
@@ -181,9 +181,9 @@ async function X(r, e) {
|
|
181
181
|
);
|
182
182
|
}
|
183
183
|
}
|
184
|
-
async function
|
184
|
+
async function X(r, e, n) {
|
185
185
|
try {
|
186
|
-
const t = await
|
186
|
+
const t = await D(
|
187
187
|
r.serverPublicKey
|
188
188
|
);
|
189
189
|
return {
|
@@ -214,14 +214,14 @@ function j() {
|
|
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 w() {
|
221
221
|
return typeof window < "u" && (window.isSecureContext || window.location.protocol === "https:");
|
222
222
|
}
|
223
223
|
function z() {
|
224
|
-
return
|
224
|
+
return L() && w();
|
225
225
|
}
|
226
226
|
function B(r) {
|
227
227
|
const e = new Uint8Array(r);
|
@@ -253,7 +253,7 @@ function q(r) {
|
|
253
253
|
function Q(r, ...e) {
|
254
254
|
typeof process < "u" && process.env && process.env.NODE_ENV === "development" && console.info(`🔐 [Crypto] ${r}`, ...e);
|
255
255
|
}
|
256
|
-
const de = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, CryptoError: o, DEFAULT_CRYPTO_CONFIG: S, arrayBufferToBase64: B, base64ToArrayBuffer: J, canUseEncryption: z, debugLog: Q, decryptFromServer:
|
256
|
+
const de = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, CryptoError: o, DEFAULT_CRYPTO_CONFIG: S, arrayBufferToBase64: B, base64ToArrayBuffer: J, canUseEncryption: z, debugLog: Q, decryptFromServer: H, encryptForServer: Y, establishCryptoSession: X, exportPublicKey: x, generateClientKeyPair: V, generateDeviceId: j, importServerPublicKey: D, isCryptoSessionValid: $, isSecureContext: w, isWebCryptoSupported: L, safeParse: q, safeStringify: W }, Symbol.toStringTag, { value: "Module" }));
|
257
257
|
export {
|
258
258
|
oe as ALL_MODELS,
|
259
259
|
ne as ALL_PROVIDERS,
|
@@ -261,29 +261,30 @@ export {
|
|
261
261
|
ye as CALLISTO_CHAT_ID_HEADER,
|
262
262
|
re as DEFAULT_PROVIDER,
|
263
263
|
ce as MODELS_PER_PROVIDER,
|
264
|
-
|
264
|
+
f as MODEL_CLAUDE_HAIKU,
|
265
265
|
p as MODEL_CLAUDE_SONNET,
|
266
|
-
|
266
|
+
R as MODEL_GEMINI_FLASH,
|
267
267
|
A as MODEL_GEMINI_PRO,
|
268
|
-
_ as
|
269
|
-
|
268
|
+
_ as MODEL_GPT4,
|
269
|
+
l as MODEL_GPT4_MINI,
|
270
|
+
u as MODEL_O4_MINI,
|
270
271
|
P as MODEL_SONAR,
|
271
|
-
|
272
|
+
I as MODEL_SONAR_PRO,
|
272
273
|
k as PLAN_FREE,
|
273
274
|
F as PLAN_PLUS,
|
274
275
|
G as PLAN_PREMIUM,
|
275
276
|
ie as POLICY_GRANTS,
|
276
277
|
i as PROVIDER_ANTHROPIC,
|
277
278
|
y as PROVIDER_GOOGLE,
|
278
|
-
|
279
|
+
m as PROVIDER_MEMORY,
|
279
280
|
a as PROVIDER_OPENAI,
|
280
281
|
d as PROVIDER_PERPLEXITY,
|
281
282
|
ae as PROVIDER_ROLE_MAP,
|
282
|
-
|
283
|
+
M as PROVIDER_SUMMARY,
|
283
284
|
c as ROLE_ASSISTANT,
|
284
285
|
ee as ROLE_HIDDEN,
|
285
286
|
te as ROLE_INTERNAL,
|
286
|
-
|
287
|
+
g as ROLE_SYSTEM,
|
287
288
|
s as ROLE_USER,
|
288
289
|
de as crypto,
|
289
290
|
Ee as findProvider
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@versini/sassysaint-common",
|
3
|
-
"version": "3.1.
|
3
|
+
"version": "3.1.1",
|
4
4
|
"license": "MIT",
|
5
5
|
"author": "Arno Versini",
|
6
6
|
"publishConfig": {
|
@@ -29,5 +29,5 @@
|
|
29
29
|
"test:watch": "vitest",
|
30
30
|
"watch": "npm-run-all dev"
|
31
31
|
},
|
32
|
-
"gitHead": "
|
32
|
+
"gitHead": "0e5c5f0dd613a0aca2f368b499f82592bf9c2fc1"
|
33
33
|
}
|