@versini/sassysaint-common 4.0.4 → 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 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 MODEL_GPT4 = "gpt-4.1";
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-4.1", "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"];
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-4.1", "o4-mini"];
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"];
@@ -87,6 +87,10 @@ declare const findProvider: (modelName: string) => null | typeof PROVIDER_ANTHRO
87
87
  */
88
88
  declare const SORT_BY_TIMESTAMP = "timestamp";
89
89
  declare const SORT_BY_TOKEN_USAGE = "tokenUsage";
90
+ /**
91
+ * Name of the application.
92
+ */
93
+ declare const APPLICATION_NAME = "Callisto";
90
94
 
91
95
  /**
92
96
  * TypeScript interfaces for Server-Mediated Encryption
@@ -286,4 +290,4 @@ declare namespace index {
286
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 };
287
291
  }
288
292
 
289
- 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, SORT_BY_TIMESTAMP, SORT_BY_TOKEN_USAGE, index as crypto, findProvider };
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 g = "system", s = "user", c = "assistant", te = "hidden", re = "data", a = "OpenAI", i = "Anthropic", E = "Google", M = "Summary", m = "Memory", d = "Perplexity", ne = a, oe = [
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
- ], _ = "gpt-4.1", l = "gpt-4.1-nano", u = "o4-mini", f = "claude-3-5-haiku-20241022", p = "claude-sonnet-4-20250514", R = "gemini-2.5-flash", A = "gemini-2.5-pro", P = "sonar", S = "sonar-pro", se = [
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,
10
+ A,
9
11
  f,
10
12
  p,
11
13
  R,
12
- A,
13
- P,
14
- S
14
+ P
15
15
  ], ce = [
16
16
  u,
17
- p,
18
- A
19
- ], b = "claude-sonnet-4", h = "claude-3", T = "gpt-4", N = "o3", v = "o4", K = "gemini", C = "sonar", U = {
17
+ A,
18
+ p
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 g = "system", s = "user", c = "assistant", te = "hidden", re = "data", a =
29
29
  [E]: [K],
30
30
  [d]: [C]
31
31
  }, ae = {
32
- [a]: [l, _, u],
33
- [i]: [f, p],
34
- [E]: [R, A],
35
- [d]: [P, S]
32
+ [a]: [_, u],
33
+ [i]: [l, A],
34
+ [E]: [f, p],
35
+ [d]: [R, P]
36
36
  }, ie = {
37
- [a]: [g, s, c],
37
+ [a]: [w, s, c],
38
38
  [i]: [s, c],
39
39
  [M]: [s, c],
40
- [m]: [s, c],
40
+ [g]: [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 = {
@@ -52,18 +52,18 @@ const g = "system", s = "user", c = "assistant", te = "hidden", re = "data", a =
52
52
  if (n.some((t) => r.startsWith(t)))
53
53
  return e;
54
54
  return null;
55
- }, ue = "timestamp", pe = "tokenUsage";
55
+ }, ue = "timestamp", Ae = "tokenUsage", pe = "Callisto";
56
56
  class o extends Error {
57
57
  constructor(e, n, t) {
58
58
  super(e), this.code = n, this.originalError = t, this.name = "CryptoError";
59
59
  }
60
60
  }
61
- const I = {
61
+ const S = {
62
62
  keySize: 4096,
63
63
  debug: !1
64
64
  };
65
65
  async function Y(r = {}) {
66
- const e = { ...I, ...r };
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 L(r) {
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 L(
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 D() {
217
+ function L() {
218
218
  return typeof window < "u" && typeof window.crypto < "u" && typeof window.crypto.subtle < "u";
219
219
  }
220
- function w() {
220
+ function D() {
221
221
  return typeof window < "u" && (window.isSecureContext || window.location.protocol === "https:");
222
222
  }
223
223
  function z() {
224
- return D() && w();
224
+ return L() && D();
225
225
  }
226
226
  function J(r) {
227
227
  const e = new Uint8Array(r);
@@ -253,30 +253,31 @@ 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 Ae = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, CryptoError: o, DEFAULT_CRYPTO_CONFIG: I, arrayBufferToBase64: J, base64ToArrayBuffer: W, canUseEncryption: z, debugLog: Z, decryptFromServer: H, encryptForServer: X, establishCryptoSession: $, exportPublicKey: x, generateClientKeyPair: Y, generateDeviceId: B, importServerPublicKey: L, isCryptoSessionValid: j, isSecureContext: w, isWebCryptoSupported: D, safeParse: Q, safeStringify: q }, Symbol.toStringTag, { value: "Module" }));
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,
260
260
  ce as ALL_REASONING_MODELS,
261
+ pe as APPLICATION_NAME,
261
262
  ye as CALLISTO_CHAT_ID_HEADER,
262
263
  ne as DEFAULT_PROVIDER,
263
264
  ae as MODELS_PER_PROVIDER,
264
- f as MODEL_CLAUDE_HAIKU,
265
- p as MODEL_CLAUDE_SONNET,
266
- R as MODEL_GEMINI_FLASH,
267
- A as MODEL_GEMINI_PRO,
268
- _ as MODEL_GPT4,
269
- l as MODEL_GPT4_MINI,
270
- u as MODEL_O4_MINI,
271
- P as MODEL_SONAR,
272
- S as MODEL_SONAR_PRO,
265
+ l as MODEL_CLAUDE_HAIKU,
266
+ A as MODEL_CLAUDE_SONNET,
267
+ f as MODEL_GEMINI_FLASH,
268
+ p as MODEL_GEMINI_PRO,
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,
273
274
  k as PLAN_FREE,
274
275
  F as PLAN_PLUS,
275
276
  G as PLAN_PREMIUM,
276
277
  Ee as POLICY_GRANTS,
277
278
  i as PROVIDER_ANTHROPIC,
278
279
  E as PROVIDER_GOOGLE,
279
- m as PROVIDER_MEMORY,
280
+ g as PROVIDER_MEMORY,
280
281
  a as PROVIDER_OPENAI,
281
282
  d as PROVIDER_PERPLEXITY,
282
283
  ie as PROVIDER_ROLE_MAP,
@@ -284,10 +285,10 @@ export {
284
285
  c as ROLE_ASSISTANT,
285
286
  te as ROLE_HIDDEN,
286
287
  re as ROLE_INTERNAL,
287
- g as ROLE_SYSTEM,
288
+ w as ROLE_SYSTEM,
288
289
  s as ROLE_USER,
289
290
  ue as SORT_BY_TIMESTAMP,
290
- pe as SORT_BY_TOKEN_USAGE,
291
- Ae as crypto,
291
+ Ae as SORT_BY_TOKEN_USAGE,
292
+ Oe as crypto,
292
293
  de as findProvider
293
294
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versini/sassysaint-common",
3
- "version": "4.0.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": "6fbcb4192fea2a841710741760d6c3d6b91c63fa"
33
+ "gitHead": "e846a9619cd9510aa7a7d8bf0395b2f8a4b29d4c"
34
34
  }