@versini/sassysaint-common 4.58.0 → 4.59.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
@@ -19,7 +19,7 @@ export declare enum ActionColor {
19
19
  * List of all models available TODAY. This is used by the client to display the
20
20
  * list of models.
21
21
  */
22
- export declare const ALL_MODELS: readonly ["gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "claude-opus-5", "claude-sonnet-5", "claude-haiku-4-5", "gemini-3.5-flash-lite", "gemini-3.8-flash", "gemini-3-pro-image"];
22
+ export declare const ALL_MODELS: readonly ["gpt-6-sol", "gpt-6-luna", "claude-opus-5-5", "claude-sonnet-5", "claude-haiku-4-5", "gemini-3.5-flash-lite", "gemini-3.8-flash", "gpt-image-2.5-flare", "gpt-image-2.5-sunburst"];
23
23
 
24
24
  export declare const ALL_PROVIDERS: readonly ["OpenAI", "Anthropic", "Google"];
25
25
 
@@ -259,8 +259,8 @@ export declare function getCompressionEmergencyThreshold(plan?: string): number;
259
259
  *
260
260
  * The function analyzes the given array of model names and organizes them into
261
261
  * a map where keys are provider names and values are arrays of models available
262
- * for that provider. Only models that exist in the MODELS_PER_PROVIDER mapping
263
- * are included.
262
+ * for that provider. Only chat models are grouped: MODELS_PER_PROVIDER ids,
263
+ * plus prefix matches when `options.matchUnknownByPrefix` is set.
264
264
  *
265
265
  * @param models - Array of model names available to the user (e.g., from
266
266
  * allowedModels in policy configuration).
@@ -290,16 +290,16 @@ export declare function getCompressionEmergencyThreshold(plan?: string): number;
290
290
  * ```
291
291
  *
292
292
  */
293
- export declare const getModelsGroupedByProvider: (models: string[]) => Map<string, string[]>;
293
+ export declare const getModelsGroupedByProvider: (models: string[], options?: ModelProviderMatchOptions) => Map<string, string[]>;
294
294
 
295
295
  /**
296
296
  * Derives the list of available AI providers from a given array of model names.
297
297
  * This function enables automatic filtering of provider options in the UI based
298
298
  * on which models are available in a user's subscription plan.
299
299
  *
300
- * The function cross-references each model against the MODELS_PER_PROVIDER
301
- * mapping to determine which providers should be available. Results are
302
- * returned in a consistent order matching ALL_PROVIDERS to ensure UI stability.
300
+ * Each model is matched against MODELS_PER_PROVIDER, and against provider
301
+ * prefixes too when `options.matchUnknownByPrefix` is set. Results are returned
302
+ * in a consistent order matching ALL_PROVIDERS to ensure UI stability.
303
303
  *
304
304
  * @param models - Array of model names available to the user (e.g., from
305
305
  * allowedModels in policy configuration).
@@ -310,11 +310,11 @@ export declare const getModelsGroupedByProvider: (models: string[]) => Map<strin
310
310
  * @example
311
311
  * ```ts
312
312
  * // User's plan includes OpenAI, Anthropic and Google models:
313
- * getProvidersFromModels([MODEL_OPENAI_LOW, MODEL_ANTHROPIC_LOW, MODEL_GOOGLE_MEDIUM]);
313
+ * getProvidersFromModels([MODEL_OPENAI_MEDIUM, MODEL_ANTHROPIC_LOW, MODEL_GOOGLE_MEDIUM]);
314
314
  * // Returns: [PROVIDER_OPENAI, PROVIDER_ANTHROPIC, PROVIDER_GOOGLE]
315
315
  *
316
316
  * // Google models removed from plan:
317
- * getProvidersFromModels([MODEL_OPENAI_LOW, MODEL_ANTHROPIC_LOW]);
317
+ * getProvidersFromModels([MODEL_OPENAI_MEDIUM, MODEL_ANTHROPIC_LOW]);
318
318
  * // Returns: [PROVIDER_OPENAI, PROVIDER_ANTHROPIC]
319
319
  * // (PROVIDER_GOOGLE is excluded)
320
320
  *
@@ -324,7 +324,7 @@ export declare const getModelsGroupedByProvider: (models: string[]) => Map<strin
324
324
  * ```
325
325
  *
326
326
  */
327
- export declare const getProvidersFromModels: (models: string[]) => Array<typeof PROVIDER_OPENAI | typeof PROVIDER_ANTHROPIC | typeof PROVIDER_GOOGLE>;
327
+ export declare const getProvidersFromModels: (models: string[], options?: ModelProviderMatchOptions) => Array<typeof PROVIDER_OPENAI | typeof PROVIDER_ANTHROPIC | typeof PROVIDER_GOOGLE>;
328
328
 
329
329
  /**
330
330
  * "Hard" categories — durable, high-trust attributes of the user (name/role,
@@ -363,12 +363,12 @@ export declare type HardCategory = (typeof HARD_CATEGORIES)[number];
363
363
  * // Returns: false (each provider has only 1 model)
364
364
  *
365
365
  * // Basic plan with single model:
366
- * hasMultipleModelsPerProvider([MODEL_OPENAI_LOW]);
366
+ * hasMultipleModelsPerProvider([MODEL_OPENAI_MEDIUM]);
367
367
  * // Returns: false
368
368
  * ```
369
369
  *
370
370
  */
371
- export declare const hasMultipleModelsPerProvider: (models: string[]) => boolean;
371
+ export declare const hasMultipleModelsPerProvider: (models: string[], options?: ModelProviderMatchOptions) => boolean;
372
372
 
373
373
  /**
374
374
  * Checks whether a user has the required capability or capabilities based on
@@ -584,7 +584,7 @@ export declare const MODEL_ANTHROPIC_LOW = "claude-haiku-4-5";
584
584
 
585
585
  export declare const MODEL_ANTHROPIC_MEDIUM = "claude-sonnet-5";
586
586
 
587
- export declare const MODEL_ANTHROPIC_TOP = "claude-opus-5";
587
+ export declare const MODEL_ANTHROPIC_TOP = "claude-opus-5-5";
588
588
 
589
589
  /**
590
590
  * The highest-volume role slot: it pays for chat titles, search summaries AND
@@ -607,7 +607,7 @@ export declare const MODEL_ANTHROPIC_TOP = "claude-opus-5";
607
607
  * time-to-first-token on long chats after deploying.
608
608
  *
609
609
  */
610
- export declare const MODEL_CHAT_SUMMARY = "gpt-5.6-luna";
610
+ export declare const MODEL_CHAT_SUMMARY = "gpt-6-luna";
611
611
 
612
612
  export declare const MODEL_DEV = "openai/gpt-oss-20b:free";
613
613
 
@@ -619,7 +619,14 @@ export declare const MODEL_DISPLAY_NAMES: Record<string, string>;
619
619
 
620
620
  export declare const MODEL_EMBEDDING_TEXT = "text-embedding-3-small";
621
621
 
622
- export declare const MODEL_GENERATE_IMAGE = "gemini-3-pro-image";
622
+ /**
623
+ * The generateImage tool picks between two OpenAI image models per call:
624
+ * MODEL_GENERATE_IMAGE is the fast default, and MODEL_GENERATE_IMAGE_PRECISE is
625
+ * the slower precision variant used for edits and detail-heavy requests.
626
+ */
627
+ export declare const MODEL_GENERATE_IMAGE = "gpt-image-2.5-flare";
628
+
629
+ export declare const MODEL_GENERATE_IMAGE_PRECISE = "gpt-image-2.5-sunburst";
623
630
 
624
631
  export declare const MODEL_GOOGLE_MEDIUM = "gemini-3.5-flash-lite";
625
632
 
@@ -632,7 +639,7 @@ export declare const MODEL_GOOGLE_TOP = "gemini-3.8-flash";
632
639
  * model for the careful, analytical edits it makes. Pinned rather than
633
640
  * borrowing the OpenAI top tier, whose value moves on every catalog bump.
634
641
  */
635
- export declare const MODEL_HUMANIZE_AUDIT = "gpt-5.6-terra";
642
+ export declare const MODEL_HUMANIZE_AUDIT = "gpt-6-sol";
636
643
 
637
644
  /**
638
645
  * The humanizer's rewrite pass needs a model that supports a high temperature
@@ -656,31 +663,31 @@ export declare const MODEL_HUMANIZE_REWRITE = "gemini-3.8-flash";
656
663
  * tighter latency tail (max 25.8s against mini's 64.4s) and used ~15% fewer
657
664
  * tokens.
658
665
  *
659
- * The OpenAI catalog bump then pointed MODEL_OPENAI_LOW at this same id. Five
660
- * symbols now hold it — MODEL_OPENAI_LOW, this slot, MODEL_CHAT_SUMMARY,
661
- * MODEL_NUTRITION_SEARCH and MODEL_REVIEW_TRUST_PANEL — so an EXACT row prices
662
- * the id and the luna row in ROLE_MODEL_PRICING is the net for whichever of
663
- * them moves first. Do not restate that set here; modelPricing.ts owns the
664
- * count.
666
+ * Bumped gpt-5.6-luna→gpt-6-luna alongside the OpenAI Luna picker tier, at half
667
+ * the price (0.10/0.50). Unlike the mini→luna move this one was NOT
668
+ * re-measured: the numbers above describe gpt-5.6-luna, so re-run the command
669
+ * above before trusting them for gpt-6-luna. This slot shares its id with other
670
+ * role slots and a picker tier; modelPricing.ts owns that set, so do not
671
+ * restate it here.
665
672
  *
666
673
  */
667
- export declare const MODEL_MEMORY_INFERENCE = "gpt-5.6-luna";
674
+ export declare const MODEL_MEMORY_INFERENCE = "gpt-6-luna";
668
675
 
669
676
  /**
670
677
  * The nutrition fallback runs a web-search-tool lookup for branded products FDC
671
678
  * does not carry. The hard requirement is native support for the hosted
672
- * `openai.tools.webSearch` tool, NOT a particular tier — this slot now holds
673
- * the same id as the entry rung, and that was confirmed in production against
674
- * "1 cup dry uncooked chickpeas": the FDC soft-failure path fell through to
675
- * this search and returned 728 kcal. Re-confirm with one branded-product lookup
676
- * before pointing this slot at any new model, since a capability loss here
677
- * degrades to a NO_DATA string and reads as "FDC didn't have it".
679
+ * `openai.tools.webSearch` tool, NOT a particular tier — this slot holds the
680
+ * same id as the entry rung. That was confirmed in production on gpt-5.6-luna
681
+ * against "1 cup dry uncooked chickpeas": the FDC soft-failure path fell
682
+ * through to this search and returned 728 kcal. gpt-6-luna was confirmed on a
683
+ * local dev server on 2026-09-23 with one branded-product lookup that reached
684
+ * this search, not yet in production. Re-confirm with one branded-product
685
+ * lookup before pointing this slot at any new model, since a capability loss
686
+ * here degrades to a NO_DATA string and reads as "FDC didn't have it".
678
687
  */
679
- export declare const MODEL_NUTRITION_SEARCH = "gpt-5.6-luna";
680
-
681
- export declare const MODEL_OPENAI_LOW = "gpt-5.6-luna";
688
+ export declare const MODEL_NUTRITION_SEARCH = "gpt-6-luna";
682
689
 
683
- export declare const MODEL_OPENAI_MEDIUM = "gpt-5.6-terra";
690
+ export declare const MODEL_OPENAI_MEDIUM = "gpt-6-luna";
684
691
 
685
692
  /**
686
693
  * List of available models TODAY.
@@ -697,13 +704,14 @@ export declare const MODEL_OPENAI_MEDIUM = "gpt-5.6-terra";
697
704
  * and not user-selectable, and the role-purpose slots (MODEL_MEMORY_INFERENCE,
698
705
  * MODEL_CHAT_SUMMARY, MODEL_SEARCH_DECOMPOSER, MODEL_HUMANIZE_REWRITE,
699
706
  * MODEL_HUMANIZE_AUDIT, MODEL_NUTRITION_SEARCH, MODEL_REVIEW_TRUST_PANEL,
700
- * MODEL_EMBEDDING_TEXT, MODEL_GENERATE_IMAGE, MODEL_DEV) are named for the job
701
- * they do rather than a provider tier, so a bump there never renames them
702
- * either. Anything that needs a specific model for a specific job belongs in
703
- * that group, NOT pointed at a picker tier whose value can move.
707
+ * MODEL_EMBEDDING_TEXT, MODEL_GENERATE_IMAGE, MODEL_GENERATE_IMAGE_PRECISE,
708
+ * MODEL_DEV) are named for the job they do rather than a provider tier, so a
709
+ * bump there never renames them either. Anything that needs a specific model
710
+ * for a specific job belongs in that group, NOT pointed at a picker tier whose
711
+ * value can move.
704
712
  *
705
713
  */
706
- export declare const MODEL_OPENAI_TOP = "gpt-5.6-sol";
714
+ export declare const MODEL_OPENAI_TOP = "gpt-6-sol";
707
715
 
708
716
  /**
709
717
  * Pseudo-model id for the Perplexity Search API (getWebSearch). Deliberately
@@ -766,6 +774,18 @@ export declare const MODEL_SONAR = "sonar";
766
774
 
767
775
  export declare const MODEL_SONAR_PRO = "sonar-pro";
768
776
 
777
+ export declare interface ModelProviderMatchOptions {
778
+ /**
779
+ * Place an id missing from this bundle's catalog by findProvider's prefix
780
+ * match. For the CLIENT picker only: client and server deploy independently,
781
+ * so a server that already moved a catalog id would otherwise leave that
782
+ * provider with no matching model, and the picker would drop it. The server
783
+ * must keep the default exact match, because its entitlement check has to
784
+ * agree with getModelNameForPlan, which accepts catalog ids only.
785
+ */
786
+ matchUnknownByPrefix?: boolean;
787
+ }
788
+
769
789
  /**
770
790
  * List of models available according to the providers.
771
791
  *
@@ -777,8 +797,8 @@ export declare const MODEL_SONAR_PRO = "sonar-pro";
777
797
  *
778
798
  */
779
799
  export declare const MODELS_PER_PROVIDER: {
780
- readonly OpenAI: readonly ["gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna"];
781
- readonly Anthropic: readonly ["claude-opus-5", "claude-haiku-4-5", "claude-sonnet-5"];
800
+ readonly OpenAI: readonly ["gpt-6-sol", "gpt-6-luna"];
801
+ readonly Anthropic: readonly ["claude-opus-5-5", "claude-haiku-4-5", "claude-sonnet-5"];
782
802
  readonly Google: readonly ["gemini-3.5-flash-lite", "gemini-3.8-flash"];
783
803
  readonly Perplexity: readonly ["sonar", "sonar-pro", "perplexity-search"];
784
804
  };
package/dist/index.js CHANGED
@@ -1 +1 @@
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.Send=4]="Send",n[n.Header=5]="Header",n[n.Provider=6]="Provider",n[n.Logo=7]="Logo",n[n.Placeholder=8]="Placeholder",n[n.Footer=9]="Footer",n);let O="system",a="user",i="assistant",o="OpenAI",s="Anthropic",_="Google",T="Summary",R="Memory",l="Perplexity",S=o,A=[o,s,_],I="gpt-5.6-sol",L="gpt-5.6-terra",M="gpt-5.6-luna",g="claude-opus-5",P="claude-sonnet-5",u="claude-haiku-4-5",c="gemini-3.8-flash",N="gemini-3.5-flash-lite",h="sonar",d="sonar-pro",D="perplexity-search",C="openai/gpt-oss-20b:free",p="gpt-5.6-luna",m="gpt-5.6-luna",U="gemini-3.5-flash-lite",f="gemini-3.8-flash",G="gpt-5.6-terra",H="gpt-5.6-luna",y="gpt-5.6-luna",B="gemini-3.6-flash",w="text-embedding-3-small",Y="gemini-3-pro-image",b=5,v=1e4,F=3e3,V={[I]:"GPT-5.6 Sol",[L]:"GPT-5.6 Terra",[M]:"GPT-5.6 Luna",[g]:"Claude Opus 5",[P]:"Claude Sonnet 5",[u]:"Claude Haiku 4.5",[c]:"Gemini 3.8 Flash",[N]:"Gemini 3.5 Flash-Lite",[h]:"Sonar",[d]:"Sonar Pro",[D]:"Perplexity Search",[Y]:"Nano Banana 3 Pro"},k=[I,L,M,g,P,u,N,c,Y],W=[I,L,M,g,P,c,N],X={[o]:[I,L,M],[s]:[g,u,P],[_]:[N,c],[l]:[h,d,D]},x={[o]:[O,a,i],[s]:[a,i],[T]:[a,i],[R]:[a,i],[_]:[a,i],[l]:[a,i]},K={[s]:["claude-opus-5","claude-opus-4","claude-sonnet-5","claude-sonnet-4","claude-haiku-4","claude-3"],[o]:["gpt-","o3","o4"],[_]:["gemini"],[l]:["sonar"]},z="x-diggidy-chat-id",Z="x-diggidy-chat-timestamp",$="complete",j="timestamp",Q="tokenUsage",q="Diggidy",J="sassy:basic",ee="sassy:plus",et="sassy:advanced",eE={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",LOCAL_BUSINESSES:"getLocalBusinesses",PRODUCTS:"getProducts",REVIEW_TRUST:"getReviewTrust",STREAMING_PICKS:"getStreamingPicks",PRONUNCIATION:"getPronunciation",FRENCH_TEACHINGS:"getFrenchTeachings"},ADDON:{ATTACHMENTS:"addon:attachments",CODEINTERPRETER:"addon:codeinterpreter",SHARE_CHAT:"addon:share-chat"}},en={code_interpreter:"Running code...",web_search:"Searching the web...",[eE.TOOL.WEATHER]:"Checking the weather...",[eE.TOOL.POLLUTION]:"Fetching air pollution data...",[eE.TOOL.BUNDLESIZE]:"Analyzing bundle size...",[eE.TOOL.URLCONTENTPARSER]:"Reading a webpage...",[eE.TOOL.WEBSEARCH]:"Searching the web...",[eE.TOOL.GITREPOSITORY]:"Looking up repository...",[eE.TOOL.HOTELS]:"Searching for hotels...",[eE.TOOL.LOCAL_BUSINESSES]:"Searching for local businesses...",[eE.TOOL.PRODUCTS]:"Searching for products...",[eE.TOOL.REVIEW_TRUST]:"Checking reviews...",[eE.TOOL.STREAMING_PICKS]:"Finding movies to stream...",[eE.TOOL.NUTRITION_FACTS]:"Fetching nutrition facts...",[eE.TOOL.GENERATE_IMAGE]:"Generating image...",[eE.TOOL.BARCODE]:"Looking up product...",[eE.TOOL.PRONUNCIATION]:"Generating pronunciation...",[eE.TOOL.HUMANIZE]:"Rewriting text...",[eE.TOOL.IMAGES]:"Searching for images..."},er="Using tools...",eO=1e5,ea=8e5;function ei(e){return e===et?ea:eO}let eo=16384,es=4,e_=3,eT=8388608,eR="context-compression-summary",el="(?:an?\\s+|another\\s+)?",eS=RegExp(`^(?:(?:ok(?:ay)?|alright|right|hey|hi|hello|yes|yep|yeah|sure|thanks|thank you|please|claude|diggidy)[\\s,]+)*(?:(?:(?:let'?s\\s+|can you\\s+|could you\\s+|can we\\s+|please\\s+)?(?:start|begin|create|open)\\s+)?${el}(?:new|fresh)\\s+(?:chat|conversation)|${el}(?:new|fresh)\\s+(?:thread|session))(?:[\\s,]+(?:please|pls|plz|now|thanks|thank you|thx|ty))*$`),eA=/^[^\p{L}\p{N}]+/u,eI=/[^\p{L}\p{N}]+$/u;function eL(e){if(!e||e.length>120)return!1;let t=e.toLowerCase().replace(/’/g,"'").replace(/\s+/g," ").trim().replace(eA,"").replace(eI,"").trim();return""!==t&&eS.test(t)}let eM=new Set(["OpenAI",s,"Google"]);function eg(e){return"string"==typeof e&&eM.has(e)}let eP=/^auto \((.+)\)$/;function eu(e){let t=e.match(eP);return t?t[1]:e}let ec=e=>{for(let[t,E]of Object.entries(K))if(E.some(t=>e.startsWith(t)))return t;return null},eN=e=>{if(!e||0===e.length)return[];let t=new Set;for(let E of e)for(let[e,n]of Object.entries(X))n.includes(E)&&("OpenAI"===e||e===s||"Google"===e)&&t.add(e);return A.filter(e=>t.has(e))},eh=e=>{let t=new Map;if(!e||0===e.length)return t;for(let E of e)for(let[e,n]of Object.entries(X))if(n.includes(E)){t.has(e)||t.set(e,[]),t.get(e)?.push(E);break}return t},ed=e=>{for(let t of eh(e).values())if(t.length>1)return!0;return!1},eD=(e,t)=>!!e&&!!t&&0!==t.length&&t.includes(e);function eC(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 ep(e){return W.includes(e)}export{k as ALL_MODELS,A as ALL_PROVIDERS,W as ALL_REASONING_MODELS,q as APPLICATION_NAME,K as APPROXIMATE_MODELS_PER_PROVIDER,eE as CAPABILITIES,$ as CHAT_COMPLETION_MARKER_KEY,eO as CONTEXT_COMPRESSION_EMERGENCY_THRESHOLD,ea as CONTEXT_COMPRESSION_EMERGENCY_THRESHOLD_PREMIUM,e_ as CONTEXT_COMPRESSION_KEEP_IMAGES,es as CONTEXT_COMPRESSION_KEEP_RECENT,eT as CONTEXT_COMPRESSION_MAX_DOCUMENT_BYTES,eR as CONTEXT_COMPRESSION_SUMMARY_ID,S as DEFAULT_PROVIDER,er as DEFAULT_TOOL_LOADING_LABEL,z as DIGGIDY_CHAT_ID_HEADER,Z as DIGGIDY_CHAT_TIMESTAMP_HEADER,t as HARD_CATEGORIES,eo as MAX_OUTPUT_TOKENS,b as MAX_SEARCH_QUERIES,e as MEMORY_CATEGORIES,X as MODELS_PER_PROVIDER,u as MODEL_ANTHROPIC_LOW,P as MODEL_ANTHROPIC_MEDIUM,g as MODEL_ANTHROPIC_TOP,m as MODEL_CHAT_SUMMARY,C as MODEL_DEV,V as MODEL_DISPLAY_NAMES,w as MODEL_EMBEDDING_TEXT,Y as MODEL_GENERATE_IMAGE,N as MODEL_GOOGLE_MEDIUM,c as MODEL_GOOGLE_TOP,G as MODEL_HUMANIZE_AUDIT,f as MODEL_HUMANIZE_REWRITE,p as MODEL_MEMORY_INFERENCE,H as MODEL_NUTRITION_SEARCH,M as MODEL_OPENAI_LOW,L as MODEL_OPENAI_MEDIUM,I as MODEL_OPENAI_TOP,D as MODEL_PERPLEXITY_SEARCH,y as MODEL_REVIEW_TRUST_PANEL,B as MODEL_REVIEW_TRUST_PANEL_GOOGLE,U as MODEL_SEARCH_DECOMPOSER,h as MODEL_SONAR,d as MODEL_SONAR_PRO,J as PLAN_BASIC,ee as PLAN_PLUS,et as PLAN_PREMIUM,s as PROVIDER_ANTHROPIC,_ as PROVIDER_GOOGLE,R as PROVIDER_MEMORY,o as PROVIDER_OPENAI,l as PROVIDER_PERPLEXITY,x as PROVIDER_ROLE_MAP,T as PROVIDER_SUMMARY,i as ROLE_ASSISTANT,O as ROLE_SYSTEM,a as ROLE_USER,F as SEARCH_DECOMPOSE_TIMEOUT_MS,v as SEARCH_QUERY_TIMEOUT_MS,j as SORT_BY_TIMESTAMP,Q as SORT_BY_TOKEN_USAGE,en as TOOL_LOADING_LABELS,ec as findProvider,ei as getCompressionEmergencyThreshold,eh as getModelsGroupedByProvider,eN as getProvidersFromModels,ed as hasMultipleModelsPerProvider,eC as isEntitled,eL as isExplicitNewChatRequest,E as isHardCategory,eD as isModelAllowedForPlan,eg as isRealProvider,ep as isReasoningModel,eu as stripAutoWrapper,r 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.Send=4]="Send",n[n.Header=5]="Header",n[n.Provider=6]="Provider",n[n.Logo=7]="Logo",n[n.Placeholder=8]="Placeholder",n[n.Footer=9]="Footer",n);let i="system",O="user",a="assistant",s="OpenAI",o="Anthropic",_="Google",l="Summary",T="Memory",R="Perplexity",S=s,A=[s,o,_],I="gpt-6-sol",L="gpt-6-luna",u="claude-opus-5-5",M="claude-sonnet-5",g="claude-haiku-4-5",P="gemini-3.8-flash",c="gemini-3.5-flash-lite",N="sonar",h="sonar-pro",d="perplexity-search",D="openai/gpt-oss-20b:free",C="gpt-6-luna",p="gpt-6-luna",m="gemini-3.5-flash-lite",G="gemini-3.8-flash",f="gpt-6-sol",U="gpt-6-luna",H="gpt-5.6-luna",y="gemini-3.6-flash",b="text-embedding-3-small",w="gpt-image-2.5-flare",B="gpt-image-2.5-sunburst",Y=5,v=1e4,F=3e3,V={[I]:"GPT-6 Sol",[L]:"GPT-6 Luna",[u]:"Claude Opus 5.5",[M]:"Claude Sonnet 5",[g]:"Claude Haiku 4.5",[P]:"Gemini 3.8 Flash",[c]:"Gemini 3.5 Flash-Lite",[N]:"Sonar",[h]:"Sonar Pro",[d]:"Perplexity Search",[w]:"GPT Image 2.5 Flare",[B]:"GPT Image 2.5 Sunburst"},k=[I,L,u,M,g,c,P,w,B],W=[I,L,u,M,P,c],X={[s]:[I,L],[o]:[u,g,M],[_]:[c,P],[R]:[N,h,d]},x={[s]:[i,O,a],[o]:[O,a],[l]:[O,a],[T]:[O,a],[_]:[O,a],[R]:[O,a]},K={[o]:["claude-opus-5","claude-opus-4","claude-sonnet-5","claude-sonnet-4","claude-haiku-4","claude-3"],[s]:["gpt-","o3","o4"],[_]:["gemini"],[R]:["sonar"]},z="x-diggidy-chat-id",Z="x-diggidy-chat-timestamp",$="complete",j="timestamp",Q="tokenUsage",q="Diggidy",J="sassy:basic",ee="sassy:plus",et="sassy:advanced",eE={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",LOCAL_BUSINESSES:"getLocalBusinesses",PRODUCTS:"getProducts",REVIEW_TRUST:"getReviewTrust",STREAMING_PICKS:"getStreamingPicks",PRONUNCIATION:"getPronunciation",FRENCH_TEACHINGS:"getFrenchTeachings"},ADDON:{ATTACHMENTS:"addon:attachments",CODEINTERPRETER:"addon:codeinterpreter",SHARE_CHAT:"addon:share-chat"}},en={code_interpreter:"Running code...",web_search:"Searching the web...",[eE.TOOL.WEATHER]:"Checking the weather...",[eE.TOOL.POLLUTION]:"Fetching air pollution data...",[eE.TOOL.BUNDLESIZE]:"Analyzing bundle size...",[eE.TOOL.URLCONTENTPARSER]:"Reading a webpage...",[eE.TOOL.WEBSEARCH]:"Searching the web...",[eE.TOOL.GITREPOSITORY]:"Looking up repository...",[eE.TOOL.HOTELS]:"Searching for hotels...",[eE.TOOL.LOCAL_BUSINESSES]:"Searching for local businesses...",[eE.TOOL.PRODUCTS]:"Searching for products...",[eE.TOOL.REVIEW_TRUST]:"Checking reviews...",[eE.TOOL.STREAMING_PICKS]:"Finding movies to stream...",[eE.TOOL.NUTRITION_FACTS]:"Fetching nutrition facts...",[eE.TOOL.GENERATE_IMAGE]:"Generating image...",[eE.TOOL.BARCODE]:"Looking up product...",[eE.TOOL.PRONUNCIATION]:"Generating pronunciation...",[eE.TOOL.HUMANIZE]:"Rewriting text...",[eE.TOOL.IMAGES]:"Searching for images..."},er="Using tools...",ei=1e5,eO=8e5;function ea(e){return e===et?eO:ei}let es=16384,eo=4,e_=3,el=8388608,eT="context-compression-summary",eR="(?:an?\\s+|another\\s+)?",eS=RegExp(`^(?:(?:ok(?:ay)?|alright|right|hey|hi|hello|yes|yep|yeah|sure|thanks|thank you|please|claude|diggidy)[\\s,]+)*(?:(?:(?:let'?s\\s+|can you\\s+|could you\\s+|can we\\s+|please\\s+)?(?:start|begin|create|open)\\s+)?${eR}(?:new|fresh)\\s+(?:chat|conversation)|${eR}(?:new|fresh)\\s+(?:thread|session))(?:[\\s,]+(?:please|pls|plz|now|thanks|thank you|thx|ty))*$`),eA=/^[^\p{L}\p{N}]+/u,eI=/[^\p{L}\p{N}]+$/u;function eL(e){if(!e||e.length>120)return!1;let t=e.toLowerCase().replace(/’/g,"'").replace(/\s+/g," ").trim().replace(eA,"").replace(eI,"").trim();return""!==t&&eS.test(t)}let eu=new Set(["OpenAI",o,"Google"]);function eM(e){return"string"==typeof e&&eu.has(e)}let eg=/^auto \((.+)\)$/;function eP(e){let t=e.match(eg);return t?t[1]:e}let ec=e=>{for(let[t,E]of Object.entries(K))if(E.some(t=>e.startsWith(t)))return t;return null},eN=/image|embedding|tts|realtime|transcribe|audio/;function eh(e,{matchUnknownByPrefix:t=!1}){for(let[t,E]of Object.entries(X))if(E.includes(e))return eM(t)?t:null;if(!t||k.includes(e)||eN.test(e))return null;let E=ec(e);return eM(E)?E:null}let ed=(e,t={})=>{if(!e||0===e.length)return[];let E=new Set;for(let n of e){let e=eh(n,t);e&&E.add(e)}return A.filter(e=>E.has(e))},eD=(e,t={})=>{let E=new Map;if(!e||0===e.length)return E;for(let n of e){let e=eh(n,t);e&&(E.has(e)||E.set(e,[]),E.get(e)?.push(n))}return E},eC=(e,t={})=>{for(let E of eD(e,t).values())if(E.length>1)return!0;return!1},ep=(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 eG(e){return W.includes(e)}export{k as ALL_MODELS,A as ALL_PROVIDERS,W as ALL_REASONING_MODELS,q as APPLICATION_NAME,K as APPROXIMATE_MODELS_PER_PROVIDER,eE as CAPABILITIES,$ as CHAT_COMPLETION_MARKER_KEY,ei as CONTEXT_COMPRESSION_EMERGENCY_THRESHOLD,eO as CONTEXT_COMPRESSION_EMERGENCY_THRESHOLD_PREMIUM,e_ as CONTEXT_COMPRESSION_KEEP_IMAGES,eo as CONTEXT_COMPRESSION_KEEP_RECENT,el as CONTEXT_COMPRESSION_MAX_DOCUMENT_BYTES,eT as CONTEXT_COMPRESSION_SUMMARY_ID,S as DEFAULT_PROVIDER,er as DEFAULT_TOOL_LOADING_LABEL,z as DIGGIDY_CHAT_ID_HEADER,Z as DIGGIDY_CHAT_TIMESTAMP_HEADER,t as HARD_CATEGORIES,es as MAX_OUTPUT_TOKENS,Y as MAX_SEARCH_QUERIES,e as MEMORY_CATEGORIES,X as MODELS_PER_PROVIDER,g as MODEL_ANTHROPIC_LOW,M as MODEL_ANTHROPIC_MEDIUM,u as MODEL_ANTHROPIC_TOP,p as MODEL_CHAT_SUMMARY,D as MODEL_DEV,V as MODEL_DISPLAY_NAMES,b as MODEL_EMBEDDING_TEXT,w as MODEL_GENERATE_IMAGE,B as MODEL_GENERATE_IMAGE_PRECISE,c as MODEL_GOOGLE_MEDIUM,P as MODEL_GOOGLE_TOP,f as MODEL_HUMANIZE_AUDIT,G as MODEL_HUMANIZE_REWRITE,C as MODEL_MEMORY_INFERENCE,U as MODEL_NUTRITION_SEARCH,L as MODEL_OPENAI_MEDIUM,I as MODEL_OPENAI_TOP,d as MODEL_PERPLEXITY_SEARCH,H as MODEL_REVIEW_TRUST_PANEL,y as MODEL_REVIEW_TRUST_PANEL_GOOGLE,m as MODEL_SEARCH_DECOMPOSER,N as MODEL_SONAR,h as MODEL_SONAR_PRO,J as PLAN_BASIC,ee as PLAN_PLUS,et as PLAN_PREMIUM,o as PROVIDER_ANTHROPIC,_ as PROVIDER_GOOGLE,T as PROVIDER_MEMORY,s as PROVIDER_OPENAI,R as PROVIDER_PERPLEXITY,x as PROVIDER_ROLE_MAP,l as PROVIDER_SUMMARY,a as ROLE_ASSISTANT,i as ROLE_SYSTEM,O as ROLE_USER,F as SEARCH_DECOMPOSE_TIMEOUT_MS,v as SEARCH_QUERY_TIMEOUT_MS,j as SORT_BY_TIMESTAMP,Q as SORT_BY_TOKEN_USAGE,en as TOOL_LOADING_LABELS,ec as findProvider,ea as getCompressionEmergencyThreshold,eD as getModelsGroupedByProvider,ed as getProvidersFromModels,eC as hasMultipleModelsPerProvider,em as isEntitled,eL as isExplicitNewChatRequest,E as isHardCategory,ep as isModelAllowedForPlan,eM as isRealProvider,eG as isReasoningModel,eP as stripAutoWrapper,r as ActionColor};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versini/sassysaint-common",
3
- "version": "4.58.0",
3
+ "version": "4.59.0",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {