@versini/sassysaint-common 4.4.0 → 4.4.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 +6 -4
- package/dist/index.js +54 -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,10 @@ 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";
|
354
356
|
};
|
355
357
|
};
|
356
358
|
/**
|
@@ -377,4 +379,4 @@ declare function isEntitlementLoaded(state: EntitlementStateLike | null | undefi
|
|
377
379
|
declare function toCapabilitySet(capabilities: string[] | undefined | null): Set<string> | null;
|
378
380
|
declare function isEntitled(capabilitiesOrSet: string[] | Set<string> | null | undefined, required: CapabilityInput, options?: IsEntitledOptions): boolean;
|
379
381
|
|
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,
|
382
|
+
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", M = "Summary", T = "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", _ = "gemini-2.5-flash", l = "gemini-2.5-pro", R = "sonar", P = "sonar-pro", se = [
|
6
|
+
d,
|
7
7
|
p,
|
8
8
|
w,
|
9
9
|
f,
|
10
|
-
|
10
|
+
O,
|
11
11
|
_,
|
12
12
|
l,
|
13
13
|
R,
|
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]: [
|
31
|
-
},
|
32
|
-
[i]: [p,
|
33
|
-
[E]: [f,
|
29
|
+
[y]: [U],
|
30
|
+
[u]: [v]
|
31
|
+
}, ce = {
|
32
|
+
[i]: [p, d],
|
33
|
+
[E]: [f, O],
|
34
34
|
[y]: [_, l],
|
35
35
|
[u]: [R, P]
|
36
|
-
},
|
37
|
-
[i]: [
|
36
|
+
}, ie = {
|
37
|
+
[i]: [g, a, c],
|
38
38
|
[E]: [a, c],
|
39
|
-
[T]: [a, c],
|
40
39
|
[M]: [a, c],
|
40
|
+
[T]: [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,64 @@ 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"
|
269
271
|
}
|
270
272
|
};
|
271
|
-
function
|
273
|
+
function fe(n) {
|
272
274
|
return !!n && Array.isArray(n.capabilities) && n.capabilities.length >= 0;
|
273
275
|
}
|
274
|
-
function
|
276
|
+
function q(n) {
|
275
277
|
return n ? new Set(n) : null;
|
276
278
|
}
|
277
|
-
function
|
279
|
+
function _e(n, e, r) {
|
278
280
|
if (!e || Array.isArray(e) && e.length === 0)
|
279
281
|
return !0;
|
280
|
-
const t = n instanceof Set ? n :
|
282
|
+
const t = n instanceof Set ? n : q(n);
|
281
283
|
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
284
|
}
|
283
285
|
export {
|
284
|
-
|
285
|
-
|
286
|
-
|
286
|
+
se as ALL_MODELS,
|
287
|
+
oe as ALL_PROVIDERS,
|
288
|
+
ae as ALL_REASONING_MODELS,
|
287
289
|
de as APPLICATION_NAME,
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
290
|
+
Ee as CALLISTO_CHAT_ID_HEADER,
|
291
|
+
pe as CAPABILITIES,
|
292
|
+
re as DEFAULT_PROVIDER,
|
293
|
+
ce as MODELS_PER_PROVIDER,
|
292
294
|
f as MODEL_CLAUDE_HAIKU,
|
293
|
-
|
295
|
+
O as MODEL_CLAUDE_SONNET,
|
294
296
|
_ as MODEL_GEMINI_FLASH,
|
295
297
|
l as MODEL_GEMINI_PRO,
|
296
|
-
O as MODEL_GPT,
|
297
298
|
p as MODEL_GPT4_MINI,
|
299
|
+
d as MODEL_GPT5,
|
298
300
|
w as MODEL_O4_MINI,
|
299
301
|
R as MODEL_SONAR,
|
300
302
|
P as MODEL_SONAR_PRO,
|
301
303
|
J as PLAN_FREE,
|
302
304
|
Z as PLAN_PLUS,
|
303
305
|
Q as PLAN_PREMIUM,
|
304
|
-
|
306
|
+
le as POLICY_GRANTS,
|
305
307
|
E as PROVIDER_ANTHROPIC,
|
306
308
|
y as PROVIDER_GOOGLE,
|
307
|
-
|
309
|
+
T as PROVIDER_MEMORY,
|
308
310
|
i as PROVIDER_OPENAI,
|
309
311
|
u as PROVIDER_PERPLEXITY,
|
310
|
-
|
311
|
-
|
312
|
+
ie as PROVIDER_ROLE_MAP,
|
313
|
+
M as PROVIDER_SUMMARY,
|
312
314
|
c as ROLE_ASSISTANT,
|
313
|
-
|
314
|
-
|
315
|
-
|
315
|
+
te as ROLE_HIDDEN,
|
316
|
+
ne as ROLE_INTERNAL,
|
317
|
+
g as ROLE_SYSTEM,
|
316
318
|
a as ROLE_USER,
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
319
|
+
Ae as SORT_BY_TIMESTAMP,
|
320
|
+
ue as SORT_BY_TOKEN_USAGE,
|
321
|
+
Oe as crypto,
|
322
|
+
ye as findProvider,
|
323
|
+
_e as isEntitled,
|
324
|
+
fe as isEntitlementLoaded,
|
325
|
+
q as toCapabilitySet
|
324
326
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@versini/sassysaint-common",
|
3
|
-
"version": "4.4.
|
3
|
+
"version": "4.4.1",
|
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": "f4c06d7fb69124a452137eff4ebf0632a4d67866"
|
36
36
|
}
|