@versini/sassysaint-common 4.2.1 → 4.4.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.
Files changed (3) hide show
  1. package/dist/index.d.ts +62 -16
  2. package/dist/index.js +165 -135
  3. package/package.json +3 -3
package/dist/index.d.ts CHANGED
@@ -54,21 +54,6 @@ declare const PROVIDER_ROLE_MAP: {
54
54
  Google: string[];
55
55
  Perplexity: string[];
56
56
  };
57
- /**
58
- * List of all plans available.
59
- */
60
- declare const PLAN_FREE = "sassy:free";
61
- declare const PLAN_PLUS = "sassy:plus";
62
- declare const PLAN_PREMIUM = "sassy:advanced";
63
- /**
64
- * List of grants available.
65
- */
66
- declare const POLICY_GRANTS: {
67
- PLAN_FREE: string;
68
- PLAN_PLUS: string;
69
- PLAN_PREMIUM: string;
70
- REASONING: string;
71
- };
72
57
  /**
73
58
  * Header string for Callisto Chat Id. Used to identify the chat in the server
74
59
  * when there is a client abort.
@@ -331,4 +316,65 @@ declare namespace index {
331
316
  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 };
332
317
  }
333
318
 
334
- 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 };
319
+ /**
320
+ * List of all plans available.
321
+ */
322
+ declare const PLAN_FREE = "sassy:free";
323
+ declare const PLAN_PLUS = "sassy:plus";
324
+ declare const PLAN_PREMIUM = "sassy:advanced";
325
+ /**
326
+ * List of grants available (coarse grain). This is to be used by client with
327
+ * the isGranted() helper to check for feature availability via JWT
328
+ * capabilities.
329
+ */
330
+ declare const POLICY_GRANTS: {
331
+ PLAN_FREE: string;
332
+ PLAN_PLUS: string;
333
+ PLAN_PREMIUM: string;
334
+ REASONING: string;
335
+ };
336
+ /**
337
+ * Capability constants (single source of truth for string ids).
338
+ * NOTE: these map 1:1 to tool names in ALL_TOOLS from @sassysaint/tools
339
+ * therefore each tools needs to import this file to name its tool correctly.
340
+ */
341
+ declare const CAPABILITIES: {
342
+ readonly TOOL: {
343
+ readonly DATETIME: "getDateTime";
344
+ readonly IMAGES: "getImages";
345
+ readonly POLLUTION: "getAirPollution";
346
+ readonly WEATHER: "getWeather";
347
+ readonly URLCONTENTPARSER: "getUrlContent";
348
+ readonly MEMORIES: "getUserMemories";
349
+ readonly HUMANIZE: "humanize";
350
+ readonly WEBSEARCH: "getWebSearch";
351
+ readonly GITREPOSITORY: "getGitRepoDetails";
352
+ readonly HOTELS: "getHotelDetails";
353
+ readonly ATTACHMENTS: "tool:attachments";
354
+ };
355
+ };
356
+ /**
357
+ * Capability entitlement helper (client/server shared).
358
+ */
359
+ type CapabilityInput = string | readonly string[];
360
+ interface IsEntitledOptions {
361
+ /**
362
+ * Allow entitlement if ANY capability matches (OR). Default false = require
363
+ * ALL.
364
+ */
365
+ any?: boolean;
366
+ /**
367
+ * Pre-supplied Set; if absent we'll build one from `capabilities`.
368
+ */
369
+ set?: Set<string>;
370
+ }
371
+ interface EntitlementStateLike {
372
+ capabilities?: string[];
373
+ version?: number;
374
+ status?: string;
375
+ }
376
+ declare function isEntitlementLoaded(state: EntitlementStateLike | null | undefined): boolean;
377
+ declare function toCapabilitySet(capabilities: string[] | undefined | null): Set<string> | null;
378
+ declare function isEntitled(capabilitiesOrSet: string[] | Set<string> | null | undefined, required: CapabilityInput, options?: IsEntitledOptions): boolean;
379
+
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, 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, isEntitled, isEntitlementLoaded, toCapabilitySet };
package/dist/index.js CHANGED
@@ -1,71 +1,66 @@
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
- a,
1
+ const D = "system", a = "user", c = "assistant", ne = "hidden", re = "data", i = "OpenAI", E = "Anthropic", y = "Google", T = "Summary", M = "Memory", u = "Perplexity", oe = i, se = [
3
2
  i,
4
- E
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,
3
+ E,
4
+ y
5
+ ], O = "gpt-5", p = "gpt-4.1-nano", w = "o4-mini", f = "claude-3-5-haiku-20241022", d = "claude-sonnet-4-20250514", _ = "gemini-2.5-flash", l = "gemini-2.5-pro", R = "sonar", P = "sonar-pro", ae = [
6
+ O,
7
+ p,
8
+ w,
9
+ f,
10
+ d,
7
11
  _,
8
- m,
9
12
  l,
10
- A,
11
- f,
12
- p,
13
13
  R,
14
14
  P
15
15
  ], ce = [
16
- 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
- [i]: [
21
- b,
16
+ O,
17
+ d,
18
+ l
19
+ ], m = "claude-sonnet-4", h = "claude-3", b = "gpt-", N = "o3", C = "o4", v = "gemini", U = "sonar", K = {
20
+ [E]: [
21
+ m,
22
22
  h
23
23
  ],
24
- [a]: [
25
- T,
24
+ [i]: [
25
+ b,
26
26
  N,
27
- v
27
+ C
28
28
  ],
29
- [E]: [K],
30
- [d]: [C]
31
- }, ae = {
32
- [a]: [_, u],
33
- [i]: [l, A],
34
- [E]: [f, p],
35
- [d]: [R, P]
29
+ [y]: [v],
30
+ [u]: [U]
36
31
  }, ie = {
37
- [a]: [w, s, c],
38
- [i]: [s, c],
39
- [M]: [s, c],
40
- [g]: [s, c],
41
- [E]: [s, c],
42
- [d]: [s, c]
43
- }, k = "sassy:free", F = "sassy:plus", G = "sassy:advanced", V = "sassy:advanced:reasoning", Ee = {
44
- PLAN_FREE: k,
45
- PLAN_PLUS: F,
46
- PLAN_PREMIUM: G,
47
- REASONING: V
48
- }, ye = "x-callisto-chat-id", de = (r) => {
49
- for (const [e, n] of Object.entries(
50
- U
32
+ [i]: [p, O],
33
+ [E]: [f, d],
34
+ [y]: [_, l],
35
+ [u]: [R, P]
36
+ }, Ee = {
37
+ [i]: [D, a, c],
38
+ [E]: [a, c],
39
+ [T]: [a, c],
40
+ [M]: [a, c],
41
+ [y]: [a, c],
42
+ [u]: [a, c]
43
+ }, ye = "x-callisto-chat-id", Ae = (n) => {
44
+ for (const [e, r] of Object.entries(
45
+ K
51
46
  ))
52
- if (n.some((t) => r.startsWith(t)))
47
+ if (r.some((t) => n.startsWith(t)))
53
48
  return e;
54
49
  return null;
55
- }, ue = "timestamp", Ae = "tokenUsage", pe = "Callisto";
56
- class o extends Error {
57
- constructor(e, n, t) {
58
- super(e), this.code = n, this.originalError = t, this.name = "CryptoError";
50
+ }, ue = "timestamp", Oe = "tokenUsage", de = "Callisto";
51
+ class s extends Error {
52
+ constructor(e, r, t) {
53
+ super(e), this.code = r, this.originalError = t, this.name = "CryptoError";
59
54
  }
60
55
  }
61
- const S = {
56
+ const I = {
62
57
  keySize: 4096,
63
58
  debug: !1
64
59
  };
65
- async function Y(r = {}) {
66
- const e = { ...S, ...r };
60
+ async function k(n = {}) {
61
+ const e = { ...I, ...n };
67
62
  try {
68
- const n = {
63
+ const r = {
69
64
  modulusLength: e.keySize,
70
65
  publicExponent: new Uint8Array([1, 0, 1]),
71
66
  // 65537
@@ -73,7 +68,7 @@ async function Y(r = {}) {
73
68
  }, t = await crypto.subtle.generateKey(
74
69
  {
75
70
  name: "RSA-OAEP",
76
- ...n
71
+ ...r
77
72
  },
78
73
  !0,
79
74
  // extractable for public key export
@@ -91,32 +86,32 @@ async function Y(r = {}) {
91
86
  publicKey: t.publicKey,
92
87
  privateKey: t.privateKey
93
88
  };
94
- } catch (n) {
95
- throw new o(
96
- `Failed to generate RSA key pair: ${n instanceof Error ? n.message : "Unknown error"}`,
89
+ } catch (r) {
90
+ throw new s(
91
+ `Failed to generate RSA key pair: ${r instanceof Error ? r.message : "Unknown error"}`,
97
92
  "KEY_GENERATION_FAILED",
98
- n instanceof Error ? n : void 0
93
+ r instanceof Error ? r : void 0
99
94
  );
100
95
  }
101
96
  }
102
- async function x(r) {
97
+ async function G(n) {
103
98
  try {
104
99
  return {
105
- jwk: await crypto.subtle.exportKey("jwk", r),
100
+ jwk: await crypto.subtle.exportKey("jwk", n),
106
101
  kty: "RSA",
107
102
  alg: "RSA-OAEP-256"
108
103
  };
109
104
  } catch (e) {
110
- throw new o(
105
+ throw new s(
111
106
  `Failed to export public key: ${e instanceof Error ? e.message : "Unknown error"}`,
112
107
  "KEY_IMPORT_FAILED",
113
108
  e instanceof Error ? e : void 0
114
109
  );
115
110
  }
116
111
  }
117
- async function I(r) {
112
+ async function S(n) {
118
113
  try {
119
- const e = JSON.parse(r);
114
+ const e = JSON.parse(n);
120
115
  return await crypto.subtle.importKey(
121
116
  "jwk",
122
117
  e,
@@ -129,166 +124,201 @@ async function I(r) {
129
124
  ["encrypt"]
130
125
  );
131
126
  } catch (e) {
132
- throw new o(
127
+ throw new s(
133
128
  `Failed to import server public key: ${e instanceof Error ? e.message : "Unknown error"}`,
134
129
  "KEY_IMPORT_FAILED",
135
130
  e instanceof Error ? e : void 0
136
131
  );
137
132
  }
138
133
  }
139
- async function X(r, e, n) {
134
+ async function F(n, e, r) {
140
135
  try {
141
- const O = new TextEncoder().encode(r), y = await crypto.subtle.encrypt(
136
+ const A = new TextEncoder().encode(n), o = await crypto.subtle.encrypt(
142
137
  {
143
138
  name: "RSA-OAEP"
144
139
  },
145
140
  e,
146
- O
141
+ A
147
142
  );
148
143
  return {
149
144
  data: btoa(
150
- String.fromCharCode(...new Uint8Array(y))
145
+ String.fromCharCode(...new Uint8Array(o))
151
146
  ),
152
147
  algorithm: "RSA-OAEP",
153
- keyId: n
148
+ keyId: r
154
149
  };
155
150
  } catch (t) {
156
- throw new o(
151
+ throw new s(
157
152
  `Failed to encrypt message for server: ${t instanceof Error ? t.message : "Unknown error"}`,
158
153
  "ENCRYPTION_FAILED",
159
154
  t instanceof Error ? t : void 0
160
155
  );
161
156
  }
162
157
  }
163
- async function H(r, e) {
158
+ async function H(n, e) {
164
159
  try {
165
- const n = Uint8Array.from(
166
- atob(r.data),
167
- (y) => y.charCodeAt(0)
160
+ const r = Uint8Array.from(
161
+ atob(n.data),
162
+ (o) => o.charCodeAt(0)
168
163
  ), t = await crypto.subtle.decrypt(
169
164
  {
170
165
  name: "RSA-OAEP"
171
166
  },
172
167
  e,
173
- n
168
+ r
174
169
  );
175
170
  return new TextDecoder().decode(t);
176
- } catch (n) {
177
- throw new o(
178
- `Failed to decrypt message from server: ${n instanceof Error ? n.message : "Unknown error"}`,
171
+ } catch (r) {
172
+ throw new s(
173
+ `Failed to decrypt message from server: ${r instanceof Error ? r.message : "Unknown error"}`,
179
174
  "DECRYPTION_FAILED",
180
- n instanceof Error ? n : void 0
175
+ r instanceof Error ? r : void 0
181
176
  );
182
177
  }
183
178
  }
184
- async function $(r, e, n) {
179
+ async function V(n, e, r) {
185
180
  try {
186
- const t = await I(
187
- r.serverPublicKey
181
+ const t = await S(
182
+ n.serverPublicKey
188
183
  );
189
184
  return {
190
185
  clientKeyPair: e,
191
186
  serverPublicKey: t,
192
- deviceId: n,
193
- serverKeyId: r.keyId,
187
+ deviceId: r,
188
+ serverKeyId: n.keyId,
194
189
  establishedAt: /* @__PURE__ */ new Date()
195
190
  };
196
191
  } catch (t) {
197
- throw new o(
192
+ throw new s(
198
193
  `Failed to establish crypto session: ${t instanceof Error ? t.message : "Unknown error"}`,
199
194
  "KEY_IMPORT_FAILED",
200
195
  t instanceof Error ? t : void 0
201
196
  );
202
197
  }
203
198
  }
204
- function j(r) {
205
- return !(!r || !r.clientKeyPair || !r.serverPublicKey);
199
+ function Y(n) {
200
+ return !(!n || !n.clientKeyPair || !n.serverPublicKey);
206
201
  }
207
- function B() {
208
- const r = Date.now().toString(36), e = new Uint8Array(8);
202
+ function x() {
203
+ const n = Date.now().toString(36), e = new Uint8Array(8);
209
204
  if (typeof window < "u" && window.crypto?.getRandomValues)
210
205
  window.crypto.getRandomValues(e);
211
206
  else
212
207
  for (let t = 0; t < e.length; t++)
213
208
  e[t] = Math.floor(Math.random() * 256);
214
- const n = Array.from(e).map((t) => t.toString(36)).join("");
215
- return `device_${r}_${n}`;
209
+ const r = Array.from(e).map((t) => t.toString(36)).join("");
210
+ return `device_${n}_${r}`;
216
211
  }
217
212
  function L() {
218
213
  return typeof window < "u" && typeof window.crypto < "u" && typeof window.crypto.subtle < "u";
219
214
  }
220
- function D() {
215
+ function g() {
221
216
  return typeof window < "u" && (window.isSecureContext || window.location.protocol === "https:");
222
217
  }
223
- function z() {
224
- return L() && D();
218
+ function X() {
219
+ return L() && g();
225
220
  }
226
- function J(r) {
227
- const e = new Uint8Array(r);
228
- let n = "";
221
+ function $(n) {
222
+ const e = new Uint8Array(n);
223
+ let r = "";
229
224
  for (let t = 0; t < e.byteLength; t++)
230
- n += String.fromCharCode(e[t]);
231
- return btoa(n);
225
+ r += String.fromCharCode(e[t]);
226
+ return btoa(r);
232
227
  }
233
- function W(r) {
234
- const e = atob(r), n = new Uint8Array(e.length);
228
+ function j(n) {
229
+ const e = atob(n), r = new Uint8Array(e.length);
235
230
  for (let t = 0; t < e.length; t++)
236
- n[t] = e.charCodeAt(t);
237
- return n.buffer;
231
+ r[t] = e.charCodeAt(t);
232
+ return r.buffer;
238
233
  }
239
- function q(r) {
234
+ function B(n) {
240
235
  try {
241
- return JSON.stringify(r);
236
+ return JSON.stringify(n);
242
237
  } catch {
243
- return String(r);
238
+ return String(n);
244
239
  }
245
240
  }
246
- function Q(r) {
241
+ function z(n) {
247
242
  try {
248
- return JSON.parse(r);
243
+ return JSON.parse(n);
249
244
  } catch {
250
245
  return null;
251
246
  }
252
247
  }
253
- function Z(r, ...e) {
254
- typeof process < "u" && process.env && process.env.NODE_ENV === "development" && console.info(`🔐 [Crypto] ${r}`, ...e);
248
+ function W(n, ...e) {
249
+ typeof process < "u" && process.env && process.env.NODE_ENV === "development" && console.info(`🔐 [Crypto] ${n}`, ...e);
250
+ }
251
+ const le = /* @__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: g, isWebCryptoSupported: L, safeParse: z, safeStringify: B }, Symbol.toStringTag, { value: "Module" })), J = "sassy:free", Z = "sassy:plus", Q = "sassy:advanced", q = "sassy:advanced:reasoning", pe = {
252
+ PLAN_FREE: J,
253
+ PLAN_PLUS: Z,
254
+ PLAN_PREMIUM: Q,
255
+ REASONING: q
256
+ }, fe = {
257
+ TOOL: {
258
+ DATETIME: "getDateTime",
259
+ IMAGES: "getImages",
260
+ POLLUTION: "getAirPollution",
261
+ WEATHER: "getWeather",
262
+ URLCONTENTPARSER: "getUrlContent",
263
+ MEMORIES: "getUserMemories",
264
+ HUMANIZE: "humanize",
265
+ WEBSEARCH: "getWebSearch",
266
+ GITREPOSITORY: "getGitRepoDetails",
267
+ HOTELS: "getHotelDetails",
268
+ ATTACHMENTS: "tool:attachments"
269
+ }
270
+ };
271
+ function _e(n) {
272
+ return !!n && Array.isArray(n.capabilities) && n.capabilities.length >= 0;
273
+ }
274
+ function ee(n) {
275
+ return n ? new Set(n) : null;
276
+ }
277
+ function Re(n, e, r) {
278
+ if (!e || Array.isArray(e) && e.length === 0)
279
+ return !0;
280
+ const t = n instanceof Set ? n : ee(n);
281
+ 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));
255
282
  }
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
283
  export {
258
- se as ALL_MODELS,
259
- oe as ALL_PROVIDERS,
284
+ ae as ALL_MODELS,
285
+ se as ALL_PROVIDERS,
260
286
  ce as ALL_REASONING_MODELS,
261
- pe as APPLICATION_NAME,
287
+ de as APPLICATION_NAME,
262
288
  ye as CALLISTO_CHAT_ID_HEADER,
263
- ne as DEFAULT_PROVIDER,
264
- ae as MODELS_PER_PROVIDER,
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,
289
+ fe as CAPABILITIES,
290
+ oe as DEFAULT_PROVIDER,
291
+ ie as MODELS_PER_PROVIDER,
292
+ f as MODEL_CLAUDE_HAIKU,
293
+ d as MODEL_CLAUDE_SONNET,
294
+ _ as MODEL_GEMINI_FLASH,
295
+ l as MODEL_GEMINI_PRO,
296
+ O as MODEL_GPT,
297
+ p as MODEL_GPT4_MINI,
298
+ w as MODEL_O4_MINI,
272
299
  R as MODEL_SONAR,
273
300
  P as MODEL_SONAR_PRO,
274
- k as PLAN_FREE,
275
- F as PLAN_PLUS,
276
- G as PLAN_PREMIUM,
277
- Ee as POLICY_GRANTS,
278
- i as PROVIDER_ANTHROPIC,
279
- E as PROVIDER_GOOGLE,
280
- g as PROVIDER_MEMORY,
281
- a as PROVIDER_OPENAI,
282
- d as PROVIDER_PERPLEXITY,
283
- ie as PROVIDER_ROLE_MAP,
284
- M as PROVIDER_SUMMARY,
301
+ J as PLAN_FREE,
302
+ Z as PLAN_PLUS,
303
+ Q as PLAN_PREMIUM,
304
+ pe as POLICY_GRANTS,
305
+ E as PROVIDER_ANTHROPIC,
306
+ y as PROVIDER_GOOGLE,
307
+ M as PROVIDER_MEMORY,
308
+ i as PROVIDER_OPENAI,
309
+ u as PROVIDER_PERPLEXITY,
310
+ Ee as PROVIDER_ROLE_MAP,
311
+ T as PROVIDER_SUMMARY,
285
312
  c as ROLE_ASSISTANT,
286
- te as ROLE_HIDDEN,
313
+ ne as ROLE_HIDDEN,
287
314
  re as ROLE_INTERNAL,
288
- w as ROLE_SYSTEM,
289
- s as ROLE_USER,
315
+ D as ROLE_SYSTEM,
316
+ a as ROLE_USER,
290
317
  ue as SORT_BY_TIMESTAMP,
291
- Ae as SORT_BY_TOKEN_USAGE,
292
- Oe as crypto,
293
- de as findProvider
318
+ Oe as SORT_BY_TOKEN_USAGE,
319
+ le as crypto,
320
+ Ae as findProvider,
321
+ Re as isEntitled,
322
+ _e as isEntitlementLoaded,
323
+ ee as toCapabilitySet
294
324
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versini/sassysaint-common",
3
- "version": "4.2.1",
3
+ "version": "4.4.0",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -19,7 +19,7 @@
19
19
  "build:types": "tsup",
20
20
  "build": "npm-run-all --serial clean build:check build:js build:types",
21
21
  "clean": "rimraf dist tmp",
22
- "comments:fix": "comments src/**/*.ts* --merge-line-comments",
22
+ "comments:fix": "comments \"src/**/*.ts*\" --merge-line-comments",
23
23
  "dev:js": "vite build --watch --mode development",
24
24
  "dev:types": "tsup --watch src",
25
25
  "dev": "npm-run-all --parallel dev:js dev:types",
@@ -32,5 +32,5 @@
32
32
  "test:watch": "vitest",
33
33
  "watch": "npm-run-all dev"
34
34
  },
35
- "gitHead": "e4097d73c3aac460481459f4b2c39d40b2f760f8"
35
+ "gitHead": "8e04dcba87baf260337a99820c5f7a32e5caf006"
36
36
  }