@versini/sassysaint-common 4.43.0 → 4.45.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 @@ export declare enum ActionColor {
20
20
  * List of all models available TODAY. This is used by the client to display the
21
21
  * list of models.
22
22
  */
23
- export declare const ALL_MODELS: readonly ["gpt-5.4", "gpt-5.4-mini", "gpt-5.4-nano", "claude-opus-4-8", "claude-sonnet-5", "claude-haiku-4-5", "gemini-3-flash-preview", "gemini-3.1-pro-preview", "gemini-3-pro-image"];
23
+ export declare const ALL_MODELS: readonly ["gpt-5.6-terra", "gpt-5.4-mini", "gpt-5.4-nano", "claude-opus-4-8", "claude-sonnet-5", "claude-haiku-4-5", "gemini-3-flash-preview", "gemini-3.1-pro-preview", "gemini-3-pro-image"];
24
24
 
25
25
  export declare const ALL_PROVIDERS: readonly ["OpenAI", "Anthropic", "Google"];
26
26
 
@@ -113,6 +113,7 @@ export declare type ColorMap = Partial<Record<ActionColor, string>>;
113
113
  * The default protects smaller (~128k) context windows. Premium plans unlock
114
114
  * large-context (~1M token) models, so their floor is far higher — a flat low
115
115
  * value would compress those chats needlessly early and defeat the opt-out.
116
+ *
116
117
  */
117
118
  export declare const CONTEXT_COMPRESSION_EMERGENCY_THRESHOLD = 100000;
118
119
 
@@ -130,14 +131,14 @@ export declare const CONTEXT_COMPRESSION_KEEP_IMAGES = 3;
130
131
 
131
132
  /**
132
133
  * Number of recent messages to keep intact during compression (two
133
- * user-assistant exchanges). Ensures the model has enough immediate
134
- * context to continue the conversation coherently.
134
+ * user-assistant exchanges). Ensures the model has enough immediate context to
135
+ * continue the conversation coherently.
135
136
  */
136
137
  export declare const CONTEXT_COMPRESSION_KEEP_RECENT = 4;
137
138
 
138
139
  /**
139
- * Stable ID assigned to the summary message produced by context
140
- * compression. Used to identify (and hide) the summary in the UI.
140
+ * Stable ID assigned to the summary message produced by context compression.
141
+ * Used to identify (and hide) the summary in the UI.
141
142
  */
142
143
  export declare const CONTEXT_COMPRESSION_SUMMARY_ID = "context-compression-summary";
143
144
 
@@ -281,7 +282,8 @@ export declare const getProvidersFromModels: (models: string[]) => Array<typeof
281
282
  * captured well. These auto-persist. Every other category is "soft" (vague
282
283
  * preferences, one-off interests, behavioral asides) and only persists on an
283
284
  * explicit "remember this" or after being seen in enough distinct chats — the
284
- * precision-first stance (see `isPersistable`). Subset of {@link MEMORY_CATEGORIES}.
285
+ * precision-first stance (see `isPersistable`). Subset of {@link
286
+ * MEMORY_CATEGORIES}.
285
287
  */
286
288
  export declare const HARD_CATEGORIES: readonly ["identity", "bio", "constraint", "professional"];
287
289
 
@@ -432,10 +434,10 @@ export declare const isModelAllowedForPlan: (selectedModel: string | undefined |
432
434
 
433
435
  /**
434
436
  * Runtime guard: true only for a real, SDK-instantiable provider literal.
435
- * Returns false for PROVIDER_AUTO, undefined, null, and anything else. Shared
436
- * by the Auto-router resolver (server) and the provider picker (client) so both
437
- * agree on what counts as a real, selectable provider — and so neither lets the
438
- * "Auto" pseudo-value leak into enum-keyed lookups.
437
+ * Returns false for undefined, null, and anything else. Shared by the server
438
+ * provider guard and the provider picker (client) so both agree on what counts
439
+ * as a real, selectable provider — and so neither lets an unknown value leak
440
+ * into enum-keyed lookups.
439
441
  */
440
442
  export declare function isRealProvider(value: unknown): value is RealProvider;
441
443
 
@@ -457,62 +459,30 @@ export declare function isRealProvider(value: unknown): value is RealProvider;
457
459
  export declare function isReasoningModel(model: string): boolean;
458
460
 
459
461
  /**
460
- * Cap per-step output tokens for streamText(). 16,384 is generous enough
461
- * for any normal response but prevents runaway generation that burns
462
- * tokens silently when the model loops or hits provider limits.
462
+ * Cap per-step output tokens for streamText(). 16,384 is generous enough for
463
+ * any normal response but prevents runaway generation that burns tokens
464
+ * silently when the model loops or hits provider limits.
463
465
  */
464
466
  export declare const MAX_OUTPUT_TOKENS = 16384;
465
467
 
466
468
  export declare const MAX_SEARCH_QUERIES = 5;
467
469
 
468
470
  /**
469
- * Canonical long-term memory category enumeration. This is the single source
470
- * of truth for memory categories across the whole stack: the Mongoose model
471
- * enum, every Zod extraction/consolidation schema, and the per-category
471
+ * Canonical long-term memory category enumeration. This is the single source of
472
+ * truth for memory categories across the whole stack: the Mongoose model enum,
473
+ * every Zod extraction/consolidation schema, and the per-category
472
474
  * default-expiration (TTL) map all derive from this one array.
473
475
  *
474
476
  * It lives in the common layer (rather than the server's DB model) on purpose:
475
477
  * the memory inference / consolidation code in `common/memory/` must reference
476
478
  * the enum without importing from `services/db/models`, which would invert the
477
479
  * intended dependency direction (model → common, never common → model).
480
+ *
478
481
  */
479
482
  export declare const MEMORY_CATEGORIES: readonly ["preference", "identity", "constraint", "habit", "bio", "device", "location", "finance", "professional", "interest", "style", "behavior", "other"];
480
483
 
481
484
  export declare type MemoryCategory = (typeof MEMORY_CATEGORIES)[number];
482
485
 
483
- export declare const MODEL_AUTO_RESPONDER_ANTHROPIC = "claude-sonnet-5";
484
-
485
- export declare const MODEL_AUTO_RESPONDER_GOOGLE = "gemini-3-flash-preview";
486
-
487
- /**
488
- * Responder models for the Auto router's lower ("cheap") tier. Distinct from
489
- * the classifier models above: these are the models that actually answer the
490
- * user, so they MUST be tool-capable. The minimal tier (nano / haiku) cannot
491
- * call tools, which breaks tool continuity — once a conversation has used a
492
- * tool, a tool-less follow-up model derails the flow. So the lower tier uses
493
- * the provider's mid model instead of its smallest:
494
- * - OpenAI: gpt-5.4-mini (premium tier stays gpt-5.4)
495
- * - Anthropic: claude-sonnet (premium tier stays claude-opus)
496
- * - Google: gemini-flash (premium tier stays gemini-pro; Google has no
497
- * tier between Flash and Pro, and Flash is already tool-capable)
498
- * The premium tier always falls through to the plan-default top model.
499
- */
500
- export declare const MODEL_AUTO_RESPONDER_OPENAI = "gpt-5.4-mini";
501
-
502
- export declare const MODEL_AUTO_ROUTER_ANTHROPIC = "claude-haiku-4-5";
503
-
504
- export declare const MODEL_AUTO_ROUTER_GOOGLE = "gemini-3-flash-preview";
505
-
506
- /**
507
- * Classifier models used by the Auto routing feature. One per real provider
508
- * to preserve brand-loyalty (Anthropic-preferred users get an Anthropic
509
- * classifier, etc.) and to let provider-native prompt caching hit on the
510
- * classifier system prompt. These are the cheapest models per provider — the
511
- * classifier only emits a small JSON object, so it never needs tools and the
512
- * minimal tier keeps latency under the hard timeout and cost negligible.
513
- */
514
- export declare const MODEL_AUTO_ROUTER_OPENAI = "gpt-5.4-nano";
515
-
516
486
  export declare const MODEL_CHAT_SUMMARY = "gpt-5.4-nano";
517
487
 
518
488
  export declare const MODEL_CLAUDE_HAIKU = "claude-haiku-4-5";
@@ -540,12 +510,17 @@ export declare const MODEL_GENERATE_IMAGE = "gemini-3-pro-image";
540
510
  /**
541
511
  * List of available models TODAY.
542
512
  */
543
- export declare const MODEL_GPT5 = "gpt-5.4";
513
+ export declare const MODEL_GPT5 = "gpt-5.6-terra";
544
514
 
545
515
  export declare const MODEL_GPT5_MINI = "gpt-5.4-mini";
546
516
 
547
517
  export declare const MODEL_GPT5_NANO = "gpt-5.4-nano";
548
518
 
519
+ /**
520
+ * Bumped nano→mini (Track 2 T7): memory extraction now emits structured
521
+ * canonical keys, an explicit-request flag, and obeys the precision gate — nano
522
+ * was too weak for that reasoning; mini materially improves salience.
523
+ */
549
524
  export declare const MODEL_MEMORY_INFERENCE = "gpt-5.4-mini";
550
525
 
551
526
  export declare const MODEL_SEARCH_DECOMPOSER = "gpt-5.4-mini";
@@ -560,7 +535,7 @@ export declare const MODEL_TEACHER = "mistral-large-latest";
560
535
  * List of models available according to the providers.
561
536
  */
562
537
  export declare const MODELS_PER_PROVIDER: {
563
- readonly OpenAI: readonly ["gpt-5.4", "gpt-5.4-mini", "gpt-5.4-nano"];
538
+ readonly OpenAI: readonly ["gpt-5.6-terra", "gpt-5.4-mini", "gpt-5.4-nano"];
564
539
  readonly Anthropic: readonly ["claude-opus-4-8", "claude-haiku-4-5", "claude-sonnet-5"];
565
540
  readonly Google: readonly ["gemini-3-flash-preview", "gemini-3.1-pro-preview"];
566
541
  readonly Perplexity: readonly ["sonar", "sonar-pro"];
@@ -586,15 +561,6 @@ export declare const PLAN_PREMIUM = "sassy:advanced";
586
561
 
587
562
  export declare const PROVIDER_ANTHROPIC = "Anthropic";
588
563
 
589
- /**
590
- * Pseudo-provider value exposed in the UI for the Auto routing feature. When
591
- * a request carries `provider: "Auto"`, the server resolves it to a real
592
- * provider via `resolveEffectiveProvider` BEFORE any enum-keyed lookup
593
- * (`MODELS_PER_PROVIDER`, `PROVIDER_ROLE_MAP`, `getModel` branches). This
594
- * value MUST NOT appear in those maps.
595
- */
596
- export declare const PROVIDER_AUTO = "Auto";
597
-
598
564
  export declare const PROVIDER_GOOGLE = "Google";
599
565
 
600
566
  export declare const PROVIDER_MEMORY = "Memory";
@@ -626,9 +592,8 @@ export declare const PROVIDER_SUMMARY = "Summary";
626
592
  /**
627
593
  * Type of a real, SDK-instantiable provider. Use this as the parameter type on
628
594
  * any function that performs enum-keyed lookups against `MODELS_PER_PROVIDER`,
629
- * `PROVIDER_ROLE_MAP`, or provider-branched logic. The compiler rejects
630
- * passing `PROVIDER_AUTO` here, preventing the pseudo-provider crash class at
631
- * build time. Runtime guards stay as backup for any `as any` escape hatches.
595
+ * `PROVIDER_ROLE_MAP`, or provider-branched logic. Runtime guards
596
+ * (`isRealProvider`) stay as backup for any `as any` escape hatches.
632
597
  */
633
598
  export declare type RealProvider = typeof PROVIDER_OPENAI | typeof PROVIDER_ANTHROPIC | typeof PROVIDER_GOOGLE | typeof PROVIDER_MISTRAL;
634
599
 
@@ -636,7 +601,6 @@ export declare const ROLE_ASSISTANT = "assistant";
636
601
 
637
602
  /**
638
603
  * Common utilities.
639
- * List of available roles.
640
604
  */
641
605
  export declare const ROLE_SYSTEM = "system";
642
606
 
@@ -647,7 +611,8 @@ export declare const ROLE_USER = "user";
647
611
  * takes 14-22s to answer a decomposed query (it runs its own search + synthesis
648
612
  * with medium context), so a tighter bound kills every sub-query before the
649
613
  * provider responds and the whole search reports a false failure. 30s leaves
650
- * headroom over the observed tail while still bounding a genuinely hung request.
614
+ * headroom over the observed tail while still bounding a genuinely hung
615
+ * request.
651
616
  */
652
617
  export declare const SEARCH_QUERY_TIMEOUT_MS = 30000;
653
618
 
@@ -658,6 +623,21 @@ export declare const SORT_BY_TIMESTAMP = "timestamp";
658
623
 
659
624
  export declare const SORT_BY_TOKEN_USAGE = "tokenUsage";
660
625
 
626
+ /**
627
+ * Strip the legacy `auto (<model>)` wrapper. Returns the raw model id when the
628
+ * wrapper matches, the input unchanged otherwise. Idempotent for non-wrapped
629
+ * values. Shared by the client (chat-history rendering) and the server (usage
630
+ * pricing / aggregation) so historical Auto data resolves to its real model.
631
+ *
632
+ * Examples:
633
+ * - `"auto (gpt-5.4-nano)"` → `"gpt-5.4-nano"`
634
+ * - `"claude-opus-4-8"` → `"claude-opus-4-8"`
635
+ * - `""` → `""`
636
+ * - `"auto ("` (malformed) → `"auto ("` (no match, returned as-is)
637
+ *
638
+ */
639
+ export declare function stripAutoWrapper(modelName: string): string;
640
+
661
641
  /**
662
642
  * Complete theme palette containing all variants. This is the structure sent
663
643
  * from the server to the client via getUserPreferences.
@@ -683,11 +663,4 @@ export declare interface ThemePalette {
683
663
  */
684
664
  export declare const TOOL_LOADING_LABELS: Record<string, string>;
685
665
 
686
- /**
687
- * Type of a provider value as it may arrive from the client in a request body.
688
- * Includes the Auto pseudo-value. `resolveEffectiveProvider` is the single
689
- * authoritative function for mapping `UserFacingProvider` to `RealProvider`.
690
- */
691
- export declare type UserFacingProvider = RealProvider | typeof PROVIDER_AUTO;
692
-
693
666
  export { }
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- let e=["preference","identity","constraint","habit","bio","device","location","finance","professional","interest","style","behavior","other"],E=["identity","bio","constraint","professional"],t=e=>E.includes(e);var O,n=((O={})[O.NewChat=0]="NewChat",O[O.Prompts=1]="Prompts",O[O.Attachment=2]="Attachment",O[O.PrivateChat=3]="PrivateChat",O[O.Reasoning=4]="Reasoning",O[O.Send=5]="Send",O[O.Header=6]="Header",O[O.Provider=7]="Provider",O[O.Logo=8]="Logo",O[O.Placeholder=9]="Placeholder",O[O.Footer=10]="Footer",O);let r="system",i="user",o="assistant",a="OpenAI",_="Anthropic",R="Google",T="Summary",A="Memory",s="Perplexity",I="Mistral",L="Auto",M=a,S=[a,_,R],l="gpt-5.4",P="gpt-5.4-mini",N="gpt-5.4-nano",g="claude-opus-4-8",D="claude-sonnet-5",d="claude-haiku-4-5",c="gemini-3-flash-preview",C="gemini-3.1-pro-preview",u="sonar",h="sonar-pro",p="openai/gpt-oss-20b:free",G="mistral-large-latest",U="gpt-5.4-mini",m="gpt-5.4-nano",H="gpt-5.4-mini",f="text-embedding-3-small",y="gemini-3-pro-image",Y=N,B=d,b=c,v=P,F=D,w=c,V=5,X=3e4,k={[l]:"GPT-5.4",[P]:"GPT-5.4 Mini",[N]:"GPT-5.4 Nano",[g]:"Claude Opus 4.8",[D]:"Claude Sonnet 5",[d]:"Claude Haiku 4.5",[C]:"Gemini 3.1 Pro",[c]:"Gemini 3 Flash",[u]:"Sonar",[h]:"Sonar Pro",[y]:"Nano Banana 3 Pro",[G]:"Mistral Large"},x=[l,P,N,g,D,d,c,C,y],K=[l,P,N,g,D,C],W={[a]:[l,P,N],[_]:[g,d,D],[R]:[c,C],[s]:[u,h]},z={[a]:[r,i,o],[_]:[i,o],[T]:[i,o],[A]:[i,o],[R]:[i,o],[s]:[i,o],[I]:[i,o]},Z={[_]:["claude-opus-4","claude-sonnet-5","claude-sonnet-4","claude-haiku-4","claude-3"],[a]:["gpt-","o3","o4"],[R]:["gemini"],[s]:["sonar"],[I]:["mistral"]},j="x-diggidy-chat-id",Q="x-diggidy-chat-timestamp",q="complete",J="timestamp",$="tokenUsage",ee="Diggidy",eE="sassy:basic",et="sassy:plus",eO="sassy:advanced",en={TOOL:{BARCODE:"getProductByBarcode",BUNDLESIZE:"getBundleSize",DATETIME:"getDateTime",GENERATE_IMAGE:"generateImage",IMAGES:"getImages",NUTRITION_FACTS:"getNutritionFacts",POLLUTION:"getAirPollution",WEATHER:"getWeather",URLCONTENTPARSER:"getUrlContent",MEMORIES:"getUserMemories",HUMANIZE:"humanize",WEBSEARCH:"getWebSearch",GITREPOSITORY:"getGitRepoDetails",HOTELS:"getHotelDetails",PRONUNCIATION:"getPronunciation",FRENCH_TEACHINGS:"getFrenchTeachings"},ADDON:{ATTACHMENTS:"addon:attachments",REASONING:"addon:reasoning",CODEINTERPRETER:"addon:codeinterpreter",SHARE_CHAT:"addon:share-chat"}},er={code_interpreter:"Running code...",web_search:"Searching the web...",[en.TOOL.WEATHER]:"Checking the weather...",[en.TOOL.POLLUTION]:"Fetching air pollution data...",[en.TOOL.BUNDLESIZE]:"Analyzing bundle size...",[en.TOOL.URLCONTENTPARSER]:"Reading a webpage...",[en.TOOL.WEBSEARCH]:"Searching the web...",[en.TOOL.GITREPOSITORY]:"Looking up repository...",[en.TOOL.HOTELS]:"Searching for hotels...",[en.TOOL.NUTRITION_FACTS]:"Fetching nutrition facts...",[en.TOOL.GENERATE_IMAGE]:"Generating image...",[en.TOOL.BARCODE]:"Looking up product...",[en.TOOL.PRONUNCIATION]:"Generating pronunciation...",[en.TOOL.HUMANIZE]:"Rewriting text...",[en.TOOL.IMAGES]:"Searching for images..."},ei="Using tools...",eo=5e4,ea=1e5,e_=8e5;function eR(e){return e===eO?e_:ea}let eT=16384,eA=4,es=3,eI="context-compression-summary",eL=new Set(["OpenAI",_,"Google",I]);function eM(e){return"string"==typeof e&&eL.has(e)}let eS=e=>{for(let[E,t]of Object.entries(Z))if(t.some(E=>e.startsWith(E)))return E;return null},el=e=>{if(!e||0===e.length)return[];let E=new Set;for(let t of e)for(let[e,O]of Object.entries(W))O.includes(t)&&("OpenAI"===e||e===_||"Google"===e)&&E.add(e);return S.filter(e=>E.has(e))},eP=e=>{let E=new Map;if(!e||0===e.length)return E;for(let t of e)for(let[e,O]of Object.entries(W))if(O.includes(t)){E.has(e)||E.set(e,[]),E.get(e)?.push(t);break}return E},eN=e=>{for(let E of eP(e).values())if(E.length>1)return!0;return!1},eg=(e,E)=>!!e&&!!E&&0!==E.length&&E.includes(e);function eD(e,E,t){if(!E||Array.isArray(E)&&0===E.length)return!0;let O=e instanceof Set?e:e?new Set(e):null;return!!O&&0!==O.size&&("string"==typeof E?O.has(E):t?.any===!0?E.some(e=>O.has(e)):E.every(e=>O.has(e)))}function ed(e){return K.includes(e)}export{x as ALL_MODELS,S as ALL_PROVIDERS,K as ALL_REASONING_MODELS,ee as APPLICATION_NAME,Z as APPROXIMATE_MODELS_PER_PROVIDER,en as CAPABILITIES,q as CHAT_COMPLETION_MARKER_KEY,ea as CONTEXT_COMPRESSION_EMERGENCY_THRESHOLD,e_ as CONTEXT_COMPRESSION_EMERGENCY_THRESHOLD_PREMIUM,es as CONTEXT_COMPRESSION_KEEP_IMAGES,eA as CONTEXT_COMPRESSION_KEEP_RECENT,eI as CONTEXT_COMPRESSION_SUMMARY_ID,eo as CONTEXT_COMPRESSION_THRESHOLD,M as DEFAULT_PROVIDER,ei as DEFAULT_TOOL_LOADING_LABEL,j as DIGGIDY_CHAT_ID_HEADER,Q as DIGGIDY_CHAT_TIMESTAMP_HEADER,E as HARD_CATEGORIES,eT as MAX_OUTPUT_TOKENS,V as MAX_SEARCH_QUERIES,e as MEMORY_CATEGORIES,W as MODELS_PER_PROVIDER,F as MODEL_AUTO_RESPONDER_ANTHROPIC,w as MODEL_AUTO_RESPONDER_GOOGLE,v as MODEL_AUTO_RESPONDER_OPENAI,B as MODEL_AUTO_ROUTER_ANTHROPIC,b as MODEL_AUTO_ROUTER_GOOGLE,Y as MODEL_AUTO_ROUTER_OPENAI,m as MODEL_CHAT_SUMMARY,d as MODEL_CLAUDE_HAIKU,g as MODEL_CLAUDE_OPUS,D as MODEL_CLAUDE_SONNET,p as MODEL_DEV,k as MODEL_DISPLAY_NAMES,f as MODEL_EMBEDDING_TEXT,c as MODEL_GEMINI_FLASH,C as MODEL_GEMINI_PRO,y as MODEL_GENERATE_IMAGE,l as MODEL_GPT5,P as MODEL_GPT5_MINI,N as MODEL_GPT5_NANO,U as MODEL_MEMORY_INFERENCE,H as MODEL_SEARCH_DECOMPOSER,u as MODEL_SONAR,h as MODEL_SONAR_PRO,G as MODEL_TEACHER,eE as PLAN_BASIC,et as PLAN_PLUS,eO as PLAN_PREMIUM,_ as PROVIDER_ANTHROPIC,L as PROVIDER_AUTO,R as PROVIDER_GOOGLE,A as PROVIDER_MEMORY,I as PROVIDER_MISTRAL,a as PROVIDER_OPENAI,s as PROVIDER_PERPLEXITY,z as PROVIDER_ROLE_MAP,T as PROVIDER_SUMMARY,o as ROLE_ASSISTANT,r as ROLE_SYSTEM,i as ROLE_USER,X as SEARCH_QUERY_TIMEOUT_MS,J as SORT_BY_TIMESTAMP,$ as SORT_BY_TOKEN_USAGE,er as TOOL_LOADING_LABELS,eS as findProvider,eR as getCompressionEmergencyThreshold,eP as getModelsGroupedByProvider,el as getProvidersFromModels,eN as hasMultipleModelsPerProvider,eD as isEntitled,t as isHardCategory,eg as isModelAllowedForPlan,eM as isRealProvider,ed as isReasoningModel,n as ActionColor};
1
+ let e=["preference","identity","constraint","habit","bio","device","location","finance","professional","interest","style","behavior","other"],t=["identity","bio","constraint","professional"],E=e=>t.includes(e);var n,r=((n={})[n.NewChat=0]="NewChat",n[n.Prompts=1]="Prompts",n[n.Attachment=2]="Attachment",n[n.PrivateChat=3]="PrivateChat",n[n.Reasoning=4]="Reasoning",n[n.Send=5]="Send",n[n.Header=6]="Header",n[n.Provider=7]="Provider",n[n.Logo=8]="Logo",n[n.Placeholder=9]="Placeholder",n[n.Footer=10]="Footer",n);let i="system",O="user",o="assistant",a="OpenAI",s="Anthropic",R="Google",_="Summary",T="Memory",A="Perplexity",l="Mistral",I=a,S=[a,s,R],M="gpt-5.6-terra",L="gpt-5.4-mini",P="gpt-5.4-nano",g="claude-opus-4-8",N="claude-sonnet-5",d="claude-haiku-4-5",D="gemini-3-flash-preview",c="gemini-3.1-pro-preview",u="sonar",C="sonar-pro",h="openai/gpt-oss-20b:free",p="mistral-large-latest",m="gpt-5.4-mini",G="gpt-5.4-nano",H="gpt-5.4-mini",f="text-embedding-3-small",U="gemini-3-pro-image",y=5,Y=3e4,B={[M]:"GPT-5.6 Terra",[L]:"GPT-5.4 Mini",[P]:"GPT-5.4 Nano",[g]:"Claude Opus 4.8",[N]:"Claude Sonnet 5",[d]:"Claude Haiku 4.5",[c]:"Gemini 3.1 Pro",[D]:"Gemini 3 Flash",[u]:"Sonar",[C]:"Sonar Pro",[U]:"Nano Banana 3 Pro",[p]:"Mistral Large"},b=[M,L,P,g,N,d,D,c,U],v=[M,L,P,g,N,c],F={[a]:[M,L,P],[s]:[g,d,N],[R]:[D,c],[A]:[u,C]},w={[a]:[i,O,o],[s]:[O,o],[_]:[O,o],[T]:[O,o],[R]:[O,o],[A]:[O,o],[l]:[O,o]},V={[s]:["claude-opus-4","claude-sonnet-5","claude-sonnet-4","claude-haiku-4","claude-3"],[a]:["gpt-","o3","o4"],[R]:["gemini"],[A]:["sonar"],[l]:["mistral"]},X="x-diggidy-chat-id",k="x-diggidy-chat-timestamp",W="complete",x="timestamp",K="tokenUsage",z="Diggidy",Z="sassy:basic",j="sassy:plus",Q="sassy:advanced",$={TOOL:{BARCODE:"getProductByBarcode",BUNDLESIZE:"getBundleSize",DATETIME:"getDateTime",GENERATE_IMAGE:"generateImage",IMAGES:"getImages",NUTRITION_FACTS:"getNutritionFacts",POLLUTION:"getAirPollution",WEATHER:"getWeather",URLCONTENTPARSER:"getUrlContent",MEMORIES:"getUserMemories",HUMANIZE:"humanize",WEBSEARCH:"getWebSearch",GITREPOSITORY:"getGitRepoDetails",HOTELS:"getHotelDetails",PRONUNCIATION:"getPronunciation",FRENCH_TEACHINGS:"getFrenchTeachings"},ADDON:{ATTACHMENTS:"addon:attachments",REASONING:"addon:reasoning",CODEINTERPRETER:"addon:codeinterpreter",SHARE_CHAT:"addon:share-chat"}},q={code_interpreter:"Running code...",web_search:"Searching the web...",[$.TOOL.WEATHER]:"Checking the weather...",[$.TOOL.POLLUTION]:"Fetching air pollution data...",[$.TOOL.BUNDLESIZE]:"Analyzing bundle size...",[$.TOOL.URLCONTENTPARSER]:"Reading a webpage...",[$.TOOL.WEBSEARCH]:"Searching the web...",[$.TOOL.GITREPOSITORY]:"Looking up repository...",[$.TOOL.HOTELS]:"Searching for hotels...",[$.TOOL.NUTRITION_FACTS]:"Fetching nutrition facts...",[$.TOOL.GENERATE_IMAGE]:"Generating image...",[$.TOOL.BARCODE]:"Looking up product...",[$.TOOL.PRONUNCIATION]:"Generating pronunciation...",[$.TOOL.HUMANIZE]:"Rewriting text...",[$.TOOL.IMAGES]:"Searching for images..."},J="Using tools...",ee=5e4,et=1e5,eE=8e5;function en(e){return e===Q?eE:et}let er=16384,ei=4,eO=3,eo="context-compression-summary",ea=new Set(["OpenAI",s,"Google",l]);function es(e){return"string"==typeof e&&ea.has(e)}let eR=/^auto \((.+)\)$/;function e_(e){let t=e.match(eR);return t?t[1]:e}let eT=e=>{for(let[t,E]of Object.entries(V))if(E.some(t=>e.startsWith(t)))return t;return null},eA=e=>{if(!e||0===e.length)return[];let t=new Set;for(let E of e)for(let[e,n]of Object.entries(F))n.includes(E)&&("OpenAI"===e||e===s||"Google"===e)&&t.add(e);return S.filter(e=>t.has(e))},el=e=>{let t=new Map;if(!e||0===e.length)return t;for(let E of e)for(let[e,n]of Object.entries(F))if(n.includes(E)){t.has(e)||t.set(e,[]),t.get(e)?.push(E);break}return t},eI=e=>{for(let t of el(e).values())if(t.length>1)return!0;return!1},eS=(e,t)=>!!e&&!!t&&0!==t.length&&t.includes(e);function eM(e,t,E){if(!t||Array.isArray(t)&&0===t.length)return!0;let n=e instanceof Set?e:e?new Set(e):null;return!!n&&0!==n.size&&("string"==typeof t?n.has(t):E?.any===!0?t.some(e=>n.has(e)):t.every(e=>n.has(e)))}function eL(e){return v.includes(e)}export{b as ALL_MODELS,S as ALL_PROVIDERS,v as ALL_REASONING_MODELS,z as APPLICATION_NAME,V as APPROXIMATE_MODELS_PER_PROVIDER,$ as CAPABILITIES,W as CHAT_COMPLETION_MARKER_KEY,et as CONTEXT_COMPRESSION_EMERGENCY_THRESHOLD,eE as CONTEXT_COMPRESSION_EMERGENCY_THRESHOLD_PREMIUM,eO as CONTEXT_COMPRESSION_KEEP_IMAGES,ei as CONTEXT_COMPRESSION_KEEP_RECENT,eo as CONTEXT_COMPRESSION_SUMMARY_ID,ee as CONTEXT_COMPRESSION_THRESHOLD,I as DEFAULT_PROVIDER,J as DEFAULT_TOOL_LOADING_LABEL,X as DIGGIDY_CHAT_ID_HEADER,k as DIGGIDY_CHAT_TIMESTAMP_HEADER,t as HARD_CATEGORIES,er as MAX_OUTPUT_TOKENS,y as MAX_SEARCH_QUERIES,e as MEMORY_CATEGORIES,F as MODELS_PER_PROVIDER,G as MODEL_CHAT_SUMMARY,d as MODEL_CLAUDE_HAIKU,g as MODEL_CLAUDE_OPUS,N as MODEL_CLAUDE_SONNET,h as MODEL_DEV,B as MODEL_DISPLAY_NAMES,f as MODEL_EMBEDDING_TEXT,D as MODEL_GEMINI_FLASH,c as MODEL_GEMINI_PRO,U as MODEL_GENERATE_IMAGE,M as MODEL_GPT5,L as MODEL_GPT5_MINI,P as MODEL_GPT5_NANO,m as MODEL_MEMORY_INFERENCE,H as MODEL_SEARCH_DECOMPOSER,u as MODEL_SONAR,C as MODEL_SONAR_PRO,p as MODEL_TEACHER,Z as PLAN_BASIC,j as PLAN_PLUS,Q as PLAN_PREMIUM,s as PROVIDER_ANTHROPIC,R as PROVIDER_GOOGLE,T as PROVIDER_MEMORY,l as PROVIDER_MISTRAL,a as PROVIDER_OPENAI,A as PROVIDER_PERPLEXITY,w as PROVIDER_ROLE_MAP,_ as PROVIDER_SUMMARY,o as ROLE_ASSISTANT,i as ROLE_SYSTEM,O as ROLE_USER,Y as SEARCH_QUERY_TIMEOUT_MS,x as SORT_BY_TIMESTAMP,K as SORT_BY_TOKEN_USAGE,q as TOOL_LOADING_LABELS,eT as findProvider,en as getCompressionEmergencyThreshold,el as getModelsGroupedByProvider,eA as getProvidersFromModels,eI as hasMultipleModelsPerProvider,eM as isEntitled,E as isHardCategory,eS as isModelAllowedForPlan,es as isRealProvider,eL as isReasoningModel,e_ as stripAutoWrapper,r as ActionColor};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versini/sassysaint-common",
3
- "version": "4.43.0",
3
+ "version": "4.45.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": "766c5339f62c011244e09cad92424ac8251cc3c2"
35
+ "gitHead": "9b0aabf913a258f190b4ee0e4442cc9849737f16"
36
36
  }