@versini/sassysaint-common 4.4.0 → 4.5.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 +7 -4
- package/dist/index.js +55 -52
- 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_GPT5 = "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";
|
@@ -331,7 +331,6 @@ declare const POLICY_GRANTS: {
|
|
331
331
|
PLAN_FREE: string;
|
332
332
|
PLAN_PLUS: string;
|
333
333
|
PLAN_PREMIUM: string;
|
334
|
-
REASONING: string;
|
335
334
|
};
|
336
335
|
/**
|
337
336
|
* Capability constants (single source of truth for string ids).
|
@@ -350,7 +349,11 @@ declare const CAPABILITIES: {
|
|
350
349
|
readonly WEBSEARCH: "getWebSearch";
|
351
350
|
readonly GITREPOSITORY: "getGitRepoDetails";
|
352
351
|
readonly HOTELS: "getHotelDetails";
|
353
|
-
|
352
|
+
};
|
353
|
+
readonly ADDON: {
|
354
|
+
readonly ATTACHMENTS: "addon:attachments";
|
355
|
+
readonly REASONING: "addon:reasoning";
|
356
|
+
readonly CODEINTERPRETER: "addon:codeinterpreter";
|
354
357
|
};
|
355
358
|
};
|
356
359
|
/**
|
@@ -377,4 +380,4 @@ declare function isEntitlementLoaded(state: EntitlementStateLike | null | undefi
|
|
377
380
|
declare function toCapabilitySet(capabilities: string[] | undefined | null): Set<string> | null;
|
378
381
|
declare function isEntitled(capabilitiesOrSet: string[] | Set<string> | null | undefined, required: CapabilityInput, options?: IsEntitledOptions): boolean;
|
379
382
|
|
380
|
-
export { ALL_MODELS, ALL_PROVIDERS, ALL_REASONING_MODELS, APPLICATION_NAME, CALLISTO_CHAT_ID_HEADER, CAPABILITIES, type CapabilityInput, DEFAULT_PROVIDER, type EntitlementStateLike, type IsEntitledOptions, MODELS_PER_PROVIDER, MODEL_CLAUDE_HAIKU, MODEL_CLAUDE_SONNET, MODEL_GEMINI_FLASH, MODEL_GEMINI_PRO,
|
383
|
+
export { ALL_MODELS, ALL_PROVIDERS, ALL_REASONING_MODELS, APPLICATION_NAME, CALLISTO_CHAT_ID_HEADER, CAPABILITIES, type CapabilityInput, DEFAULT_PROVIDER, type EntitlementStateLike, type IsEntitledOptions, MODELS_PER_PROVIDER, MODEL_CLAUDE_HAIKU, MODEL_CLAUDE_SONNET, MODEL_GEMINI_FLASH, MODEL_GEMINI_PRO, MODEL_GPT4_MINI, MODEL_GPT5, 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, isEntitled, isEntitlementLoaded, toCapabilitySet };
|
package/dist/index.js
CHANGED
@@ -1,22 +1,22 @@
|
|
1
|
-
const
|
1
|
+
const g = "system", a = "user", c = "assistant", te = "hidden", ne = "data", i = "OpenAI", E = "Anthropic", y = "Google", T = "Summary", M = "Memory", u = "Perplexity", re = i, oe = [
|
2
2
|
i,
|
3
3
|
E,
|
4
4
|
y
|
5
|
-
],
|
6
|
-
|
5
|
+
], d = "gpt-5", p = "gpt-4.1-nano", w = "o4-mini", f = "claude-3-5-haiku-20241022", O = "claude-sonnet-4-20250514", R = "gemini-2.5-flash", l = "gemini-2.5-pro", _ = "sonar", P = "sonar-pro", se = [
|
6
|
+
d,
|
7
7
|
p,
|
8
8
|
w,
|
9
9
|
f,
|
10
|
-
|
11
|
-
_,
|
12
|
-
l,
|
10
|
+
O,
|
13
11
|
R,
|
12
|
+
l,
|
13
|
+
_,
|
14
14
|
P
|
15
|
-
],
|
16
|
-
O,
|
15
|
+
], ae = [
|
17
16
|
d,
|
17
|
+
O,
|
18
18
|
l
|
19
|
-
], m = "claude-sonnet-4", h = "claude-3", b = "gpt-", N = "o3", C = "o4",
|
19
|
+
], m = "claude-sonnet-4", h = "claude-3", b = "gpt-", N = "o3", C = "o4", U = "gemini", v = "sonar", K = {
|
20
20
|
[E]: [
|
21
21
|
m,
|
22
22
|
h
|
@@ -26,28 +26,28 @@ const D = "system", a = "user", c = "assistant", ne = "hidden", re = "data", i =
|
|
26
26
|
N,
|
27
27
|
C
|
28
28
|
],
|
29
|
-
[y]: [
|
30
|
-
[u]: [
|
29
|
+
[y]: [U],
|
30
|
+
[u]: [v]
|
31
|
+
}, ce = {
|
32
|
+
[i]: [p, d],
|
33
|
+
[E]: [f, O],
|
34
|
+
[y]: [R, l],
|
35
|
+
[u]: [_, P]
|
31
36
|
}, ie = {
|
32
|
-
[i]: [
|
33
|
-
[E]: [f, d],
|
34
|
-
[y]: [_, l],
|
35
|
-
[u]: [R, P]
|
36
|
-
}, Ee = {
|
37
|
-
[i]: [D, a, c],
|
37
|
+
[i]: [g, a, c],
|
38
38
|
[E]: [a, c],
|
39
39
|
[T]: [a, c],
|
40
40
|
[M]: [a, c],
|
41
41
|
[y]: [a, c],
|
42
42
|
[u]: [a, c]
|
43
|
-
},
|
43
|
+
}, Ee = "x-callisto-chat-id", ye = (n) => {
|
44
44
|
for (const [e, r] of Object.entries(
|
45
45
|
K
|
46
46
|
))
|
47
47
|
if (r.some((t) => n.startsWith(t)))
|
48
48
|
return e;
|
49
49
|
return null;
|
50
|
-
},
|
50
|
+
}, Ae = "timestamp", ue = "tokenUsage", de = "Callisto";
|
51
51
|
class s extends Error {
|
52
52
|
constructor(e, r, t) {
|
53
53
|
super(e), this.code = r, this.originalError = t, this.name = "CryptoError";
|
@@ -212,11 +212,11 @@ function x() {
|
|
212
212
|
function L() {
|
213
213
|
return typeof window < "u" && typeof window.crypto < "u" && typeof window.crypto.subtle < "u";
|
214
214
|
}
|
215
|
-
function
|
215
|
+
function D() {
|
216
216
|
return typeof window < "u" && (window.isSecureContext || window.location.protocol === "https:");
|
217
217
|
}
|
218
218
|
function X() {
|
219
|
-
return L() &&
|
219
|
+
return L() && D();
|
220
220
|
}
|
221
221
|
function $(n) {
|
222
222
|
const e = new Uint8Array(n);
|
@@ -248,12 +248,11 @@ function z(n) {
|
|
248
248
|
function W(n, ...e) {
|
249
249
|
typeof process < "u" && process.env && process.env.NODE_ENV === "development" && console.info(`🔐 [Crypto] ${n}`, ...e);
|
250
250
|
}
|
251
|
-
const
|
251
|
+
const Oe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, CryptoError: s, DEFAULT_CRYPTO_CONFIG: I, arrayBufferToBase64: $, base64ToArrayBuffer: j, canUseEncryption: X, debugLog: W, decryptFromServer: H, encryptForServer: F, establishCryptoSession: V, exportPublicKey: G, generateClientKeyPair: k, generateDeviceId: x, importServerPublicKey: S, isCryptoSessionValid: Y, isSecureContext: D, isWebCryptoSupported: L, safeParse: z, safeStringify: B }, Symbol.toStringTag, { value: "Module" })), J = "sassy:free", Z = "sassy:plus", Q = "sassy:advanced", le = {
|
252
252
|
PLAN_FREE: J,
|
253
253
|
PLAN_PLUS: Z,
|
254
|
-
PLAN_PREMIUM: Q
|
255
|
-
|
256
|
-
}, fe = {
|
254
|
+
PLAN_PREMIUM: Q
|
255
|
+
}, pe = {
|
257
256
|
TOOL: {
|
258
257
|
DATETIME: "getDateTime",
|
259
258
|
IMAGES: "getImages",
|
@@ -264,61 +263,65 @@ const le = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
264
263
|
HUMANIZE: "humanize",
|
265
264
|
WEBSEARCH: "getWebSearch",
|
266
265
|
GITREPOSITORY: "getGitRepoDetails",
|
267
|
-
HOTELS: "getHotelDetails"
|
268
|
-
|
266
|
+
HOTELS: "getHotelDetails"
|
267
|
+
},
|
268
|
+
ADDON: {
|
269
|
+
ATTACHMENTS: "addon:attachments",
|
270
|
+
REASONING: "addon:reasoning",
|
271
|
+
CODEINTERPRETER: "addon:codeinterpreter"
|
269
272
|
}
|
270
273
|
};
|
271
|
-
function
|
274
|
+
function fe(n) {
|
272
275
|
return !!n && Array.isArray(n.capabilities) && n.capabilities.length >= 0;
|
273
276
|
}
|
274
|
-
function
|
277
|
+
function q(n) {
|
275
278
|
return n ? new Set(n) : null;
|
276
279
|
}
|
277
280
|
function Re(n, e, r) {
|
278
281
|
if (!e || Array.isArray(e) && e.length === 0)
|
279
282
|
return !0;
|
280
|
-
const t = n instanceof Set ? n :
|
283
|
+
const t = n instanceof Set ? n : q(n);
|
281
284
|
return !t || t.size === 0 ? !1 : typeof e == "string" ? t.has(e) : r?.any === !0 ? e.some((o) => t.has(o)) : e.every((o) => t.has(o));
|
282
285
|
}
|
283
286
|
export {
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
+
se as ALL_MODELS,
|
288
|
+
oe as ALL_PROVIDERS,
|
289
|
+
ae as ALL_REASONING_MODELS,
|
287
290
|
de as APPLICATION_NAME,
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
291
|
+
Ee as CALLISTO_CHAT_ID_HEADER,
|
292
|
+
pe as CAPABILITIES,
|
293
|
+
re as DEFAULT_PROVIDER,
|
294
|
+
ce as MODELS_PER_PROVIDER,
|
292
295
|
f as MODEL_CLAUDE_HAIKU,
|
293
|
-
|
294
|
-
|
296
|
+
O as MODEL_CLAUDE_SONNET,
|
297
|
+
R as MODEL_GEMINI_FLASH,
|
295
298
|
l as MODEL_GEMINI_PRO,
|
296
|
-
O as MODEL_GPT,
|
297
299
|
p as MODEL_GPT4_MINI,
|
300
|
+
d as MODEL_GPT5,
|
298
301
|
w as MODEL_O4_MINI,
|
299
|
-
|
302
|
+
_ as MODEL_SONAR,
|
300
303
|
P as MODEL_SONAR_PRO,
|
301
304
|
J as PLAN_FREE,
|
302
305
|
Z as PLAN_PLUS,
|
303
306
|
Q as PLAN_PREMIUM,
|
304
|
-
|
307
|
+
le as POLICY_GRANTS,
|
305
308
|
E as PROVIDER_ANTHROPIC,
|
306
309
|
y as PROVIDER_GOOGLE,
|
307
310
|
M as PROVIDER_MEMORY,
|
308
311
|
i as PROVIDER_OPENAI,
|
309
312
|
u as PROVIDER_PERPLEXITY,
|
310
|
-
|
313
|
+
ie as PROVIDER_ROLE_MAP,
|
311
314
|
T as PROVIDER_SUMMARY,
|
312
315
|
c as ROLE_ASSISTANT,
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
+
te as ROLE_HIDDEN,
|
317
|
+
ne as ROLE_INTERNAL,
|
318
|
+
g as ROLE_SYSTEM,
|
316
319
|
a as ROLE_USER,
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
320
|
+
Ae as SORT_BY_TIMESTAMP,
|
321
|
+
ue as SORT_BY_TOKEN_USAGE,
|
322
|
+
Oe as crypto,
|
323
|
+
ye as findProvider,
|
321
324
|
Re as isEntitled,
|
322
|
-
|
323
|
-
|
325
|
+
fe as isEntitlementLoaded,
|
326
|
+
q as toCapabilitySet
|
324
327
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@versini/sassysaint-common",
|
3
|
-
"version": "4.
|
3
|
+
"version": "4.5.0",
|
4
4
|
"license": "MIT",
|
5
5
|
"author": "Arno Versini",
|
6
6
|
"publishConfig": {
|
@@ -32,5 +32,5 @@
|
|
32
32
|
"test:watch": "vitest",
|
33
33
|
"watch": "npm-run-all dev"
|
34
34
|
},
|
35
|
-
"gitHead": "
|
35
|
+
"gitHead": "2c5d93f605ca1e660cb8d2541a8b10e2407cd8d1"
|
36
36
|
}
|