@versini/sassysaint-common 4.64.0 → 4.65.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 +37 -12
- package/dist/index.js +1 -1
- package/package.json +5 -1
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-6.1-sol", "gpt-6-luna", "claude-opus-5-5", "claude-sonnet-5-5", "claude-haiku-5-5", "gemini-3.5-flash-lite", "gemini-3.8-flash", "gpt-image-2.5-
|
|
22
|
+
export declare const ALL_MODELS: readonly ["gpt-6.1-sol", "gpt-6-luna", "claude-opus-5-5", "claude-sonnet-5-5", "claude-haiku-5-5", "gemini-3.5-flash-lite", "gemini-3.8-flash", "gpt-image-2.5-sunburst"];
|
|
23
23
|
|
|
24
24
|
export declare const ALL_PROVIDERS: readonly ["OpenAI", "Anthropic", "Google"];
|
|
25
25
|
|
|
@@ -640,13 +640,13 @@ export declare const MODEL_DISPLAY_NAMES: Record<string, string>;
|
|
|
640
640
|
export declare const MODEL_EMBEDDING_TEXT = "text-embedding-3-small";
|
|
641
641
|
|
|
642
642
|
/**
|
|
643
|
-
* The generateImage tool
|
|
644
|
-
*
|
|
645
|
-
*
|
|
643
|
+
* The generateImage tool uses one OpenAI image model for every call, new images
|
|
644
|
+
* and edits alike. gpt-image-2.5-flare used to make new images, and was dropped
|
|
645
|
+
* after a side-by-side on 2026-10-11: on "A pelican riding a bicycle" it drew a
|
|
646
|
+
* foot with no leg in 2 of 5 images, Sunburst in 0 of 5, at the same output
|
|
647
|
+
* tokens and about 15 seconds slower.
|
|
646
648
|
*/
|
|
647
|
-
export declare const MODEL_GENERATE_IMAGE = "gpt-image-2.5-
|
|
648
|
-
|
|
649
|
-
export declare const MODEL_GENERATE_IMAGE_PRECISE = "gpt-image-2.5-sunburst";
|
|
649
|
+
export declare const MODEL_GENERATE_IMAGE = "gpt-image-2.5-sunburst";
|
|
650
650
|
|
|
651
651
|
export declare const MODEL_GOOGLE_MEDIUM = "gemini-3.5-flash-lite";
|
|
652
652
|
|
|
@@ -731,11 +731,10 @@ export declare const MODEL_OPENAI_MEDIUM = "gpt-6-luna";
|
|
|
731
731
|
* and not user-selectable, and the role-purpose slots (MODEL_MEMORY_INFERENCE,
|
|
732
732
|
* MODEL_CHAT_SUMMARY, MODEL_SEARCH_DECOMPOSER, MODEL_HUMANIZE_REWRITE,
|
|
733
733
|
* MODEL_HUMANIZE_AUDIT, MODEL_NUTRITION_SEARCH, MODEL_REVIEW_TRUST_PANEL,
|
|
734
|
-
* MODEL_EMBEDDING_TEXT, MODEL_GENERATE_IMAGE,
|
|
735
|
-
*
|
|
736
|
-
*
|
|
737
|
-
*
|
|
738
|
-
* value can move.
|
|
734
|
+
* MODEL_EMBEDDING_TEXT, MODEL_GENERATE_IMAGE, MODEL_DEV) are named for the job
|
|
735
|
+
* they do rather than a provider tier, so a bump there never renames them
|
|
736
|
+
* either. Anything that needs a specific model for a specific job belongs in
|
|
737
|
+
* that group, NOT pointed at a picker tier whose value can move.
|
|
739
738
|
*
|
|
740
739
|
*/
|
|
741
740
|
export declare const MODEL_OPENAI_TOP = "gpt-6.1-sol";
|
|
@@ -875,6 +874,19 @@ export declare const PROVIDER_ROLE_MAP: {
|
|
|
875
874
|
|
|
876
875
|
export declare const PROVIDER_SUMMARY = "Summary";
|
|
877
876
|
|
|
877
|
+
/**
|
|
878
|
+
* Quick Access, a user preference (Settings > Header): the panel an icon next
|
|
879
|
+
* to the header's gear opens in one tap, or none. In the iOS menu sheet's
|
|
880
|
+
* order. Profile is left out: it is the first row of the menu the gear opens.
|
|
881
|
+
*/
|
|
882
|
+
export declare const QUICK_ACCESS_NONE = "none";
|
|
883
|
+
|
|
884
|
+
export declare const QUICK_ACCESS_PANELS: readonly ["settings", "shortcuts", "memories", "history", "usage", "about"];
|
|
885
|
+
|
|
886
|
+
export declare type QuickAccess = QuickAccessPanel | typeof QUICK_ACCESS_NONE;
|
|
887
|
+
|
|
888
|
+
export declare type QuickAccessPanel = (typeof QUICK_ACCESS_PANELS)[number];
|
|
889
|
+
|
|
878
890
|
/**
|
|
879
891
|
* The read-marker parts for a persisted message's `readUrls`, skipping entries
|
|
880
892
|
* without a string URL. A record counts as a full read only when `partial` is
|
|
@@ -894,6 +906,19 @@ export declare function readUrlParts(readUrls: unknown): {
|
|
|
894
906
|
*/
|
|
895
907
|
export declare type RealProvider = typeof PROVIDER_OPENAI | typeof PROVIDER_ANTHROPIC | typeof PROVIDER_GOOGLE;
|
|
896
908
|
|
|
909
|
+
/**
|
|
910
|
+
* Resolve a stored Quick Access preference: one of QUICK_ACCESS_PANELS, or
|
|
911
|
+
* QUICK_ACCESS_NONE for anything else, whatever the DB or a client sent.
|
|
912
|
+
*
|
|
913
|
+
* @example
|
|
914
|
+
* ```ts
|
|
915
|
+
* resolveQuickAccess("history"); // Returns: "history"
|
|
916
|
+
* resolveQuickAccess("profile"); // Returns: "none"
|
|
917
|
+
* ```
|
|
918
|
+
*
|
|
919
|
+
*/
|
|
920
|
+
export declare function resolveQuickAccess(stored?: unknown): QuickAccess;
|
|
921
|
+
|
|
897
922
|
/**
|
|
898
923
|
* Resolve a stored Response Speed preference into a complete per-provider
|
|
899
924
|
* record. Missing providers and unknown values fall back to
|
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 r,n=((r={})[r.NewChat=0]="NewChat",r[r.Prompts=1]="Prompts",r[r.Attachment=2]="Attachment",r[r.PrivateChat=3]="PrivateChat",r[r.Send=4]="Send",r[r.Header=5]="Header",r[r.Provider=6]="Provider",r[r.Logo=7]="Logo",r[r.Placeholder=8]="Placeholder",r[r.Footer=9]="Footer",r);let a="system",i="user",O="assistant",
|
|
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 r,n=((r={})[r.NewChat=0]="NewChat",r[r.Prompts=1]="Prompts",r[r.Attachment=2]="Attachment",r[r.PrivateChat=3]="PrivateChat",r[r.Send=4]="Send",r[r.Header=5]="Header",r[r.Provider=6]="Provider",r[r.Logo=7]="Logo",r[r.Placeholder=8]="Placeholder",r[r.Footer=9]="Footer",r);let a="system",i="user",O="assistant",s="OpenAI",o="Anthropic",_="Google",l="Summary",R="Memory",S="Perplexity",T=s,u=[s,o,_],A="gpt-6.1-sol",P="gpt-6-luna",I="claude-opus-5-5",L="claude-sonnet-5-5",c="claude-haiku-5-5",g="gemini-3.8-flash",M="gemini-3.5-flash-lite",h="sonar",N="sonar-pro",d="perplexity-search",D="openai/gpt-oss-20b:free",C="claude-haiku-5-5",p="gpt-6-luna",m="gemini-3.5-flash-lite",U="gemini-3.8-flash",f="gpt-6.1-sol",G="gpt-6-luna",y="gpt-5.6-luna",H="gemini-3.6-flash",b="text-embedding-3-small",w="gpt-image-2.5-sunburst",B=5,F=1e4,Y=3e3,v={[A]:"GPT-6.1 Sol",[P]:"GPT-6 Luna",[I]:"Claude Opus 5.5",[L]:"Claude Sonnet 5.5",[c]:"Claude Haiku 5.5",[g]:"Gemini 3.8 Flash",[M]:"Gemini 3.5 Flash-Lite",[h]:"Sonar",[N]:"Sonar Pro",[d]:"Perplexity Search",[w]:"GPT Image 2.5 Sunburst"},k=[A,P,I,L,c,M,g,w],V=[A,P,I,L,c,g,M],W="fast",X="balanced",x="thorough",K=[W,X,x],z={[W]:"low",[X]:"medium",[x]:"high"},Z={[s]:W,[o]:X,[_]:W},Q="none",$=["settings","shortcuts","memories","history","usage","about"],j={[s]:[A,P],[o]:[I,c,L],[_]:[M,g],[S]:[h,N,d]},q={[s]:[a,i,O],[o]:[i,O],[l]:[i,O],[R]:[i,O],[_]:[i,O],[S]:[i,O]},J={[o]:["claude-opus-5","claude-opus-4","claude-sonnet-5","claude-sonnet-4","claude-haiku-5","claude-haiku-4","claude-3"],[s]:["gpt-","o3","o4"],[_]:["gemini"],[S]:["sonar"]},ee="x-diggidy-chat-id",et="x-diggidy-chat-timestamp",eE="complete",er="timestamp",en="tokenUsage",ea="Diggidy",ei="sassy:basic",eO="sassy:plus",es="sassy:advanced",eo={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",PAST_CHATS:"searchPastChats"},ADDON:{ATTACHMENTS:"addon:attachments",CODEINTERPRETER:"addon:codeinterpreter",SHARE_CHAT:"addon:share-chat"}},e_={code_interpreter:"Running code...",web_search:"Searching the web...",[eo.TOOL.WEATHER]:"Checking the weather...",[eo.TOOL.POLLUTION]:"Fetching air pollution data...",[eo.TOOL.BUNDLESIZE]:"Analyzing bundle size...",[eo.TOOL.URLCONTENTPARSER]:"Reading a webpage...",[eo.TOOL.WEBSEARCH]:"Searching the web...",[eo.TOOL.GITREPOSITORY]:"Looking up repository...",[eo.TOOL.HOTELS]:"Searching for hotels...",[eo.TOOL.LOCAL_BUSINESSES]:"Searching for local businesses...",[eo.TOOL.PRODUCTS]:"Searching for products...",[eo.TOOL.REVIEW_TRUST]:"Checking reviews...",[eo.TOOL.STREAMING_PICKS]:"Finding movies to stream...",[eo.TOOL.NUTRITION_FACTS]:"Fetching nutrition facts...",[eo.TOOL.GENERATE_IMAGE]:"Generating image...",[eo.TOOL.BARCODE]:"Looking up product...",[eo.TOOL.PRONUNCIATION]:"Generating pronunciation...",[eo.TOOL.HUMANIZE]:"Rewriting text...",[eo.TOOL.IMAGES]:"Searching for images...",[eo.TOOL.PAST_CHATS]:"Searching your past chats..."},el="Using tools...",eR=1e5,eS=8e5;function eT(e){return e===es?eS:eR}let eu=16384,eA=4,eP=3,eI=8388608,eL="context-compression-summary",ec="data-urlRead",eg="[Note from the system: you read",eM="(?:an?\\s+|another\\s+)?",eh=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+)?${eM}(?:new|fresh)\\s+(?:chat|conversation)|${eM}(?:new|fresh)\\s+(?:thread|session))(?:[\\s,]+(?:please|pls|plz|now|thanks|thank you|thx|ty))*$`),eN=/^[^\p{L}\p{N}]+/u,ed=/[^\p{L}\p{N}]+$/u;function eD(e){if(!e||e.length>120)return!1;let t=e.toLowerCase().replace(/’/g,"'").replace(/\s+/g," ").trim().replace(eN,"").replace(ed,"").trim();return""!==t&&eh.test(t)}function eC(e){return{type:ec,data:e}}function ep(e){return Array.isArray(e)?e.filter(e=>"string"==typeof e?.url).map(e=>eC({url:e.url,partial:!1!==e.partial})):[]}let em=new Set(["OpenAI",o,"Google"]);function eU(e){return"string"==typeof e&&em.has(e)}let ef=/^auto \((.+)\)$/;function eG(e){let t=e.match(ef);return t?t[1]:e}let ey=e=>{for(let[t,E]of Object.entries(J))if(E.some(t=>e.startsWith(t)))return t;return null},eH=/image|embedding|tts|realtime|transcribe|audio/;function eb(e,{matchUnknownByPrefix:t=!1}){for(let[t,E]of Object.entries(j))if(E.includes(e))return eU(t)?t:null;if(!t||k.includes(e)||eH.test(e))return null;let E=ey(e);return eU(E)?E:null}let ew=(e,t={})=>{if(!e||0===e.length)return[];let E=new Set;for(let r of e){let e=eb(r,t);e&&E.add(e)}return u.filter(e=>E.has(e))},eB=(e,t={})=>{let E=new Map;if(!e||0===e.length)return E;for(let r of e){let e=eb(r,t);e&&(E.has(e)||E.set(e,[]),E.get(e)?.push(r))}return E},eF=(e,t={})=>{for(let E of eB(e,t).values())if(E.length>1)return!0;return!1},eY=(e,t)=>!!e&&!!t&&0!==t.length&&t.includes(e);function ev(e,t,E){if(!t||Array.isArray(t)&&0===t.length)return!0;let r=e instanceof Set?e:e?new Set(e):null;return!!r&&0!==r.size&&("string"==typeof t?r.has(t):E?.any===!0?t.some(e=>r.has(e)):t.every(e=>r.has(e)))}function ek(e){return V.includes(e)}function eV(e){let t=t=>{let E=e?.[t];return K.includes(E)?E:Z[t]};return{OpenAI:t("OpenAI"),[o]:t(o),Google:t("Google")}}function eW(e){return $.includes(e)?e:"none"}export{k as ALL_MODELS,u as ALL_PROVIDERS,V as ALL_REASONING_MODELS,ea as APPLICATION_NAME,J as APPROXIMATE_MODELS_PER_PROVIDER,eo as CAPABILITIES,eE as CHAT_COMPLETION_MARKER_KEY,eR as CONTEXT_COMPRESSION_EMERGENCY_THRESHOLD,eS as CONTEXT_COMPRESSION_EMERGENCY_THRESHOLD_PREMIUM,eP as CONTEXT_COMPRESSION_KEEP_IMAGES,eA as CONTEXT_COMPRESSION_KEEP_RECENT,eI as CONTEXT_COMPRESSION_MAX_DOCUMENT_BYTES,eL as CONTEXT_COMPRESSION_SUMMARY_ID,T as DEFAULT_PROVIDER,Z as DEFAULT_RESPONSE_SPEED,el as DEFAULT_TOOL_LOADING_LABEL,ee as DIGGIDY_CHAT_ID_HEADER,et as DIGGIDY_CHAT_TIMESTAMP_HEADER,t as HARD_CATEGORIES,eu as MAX_OUTPUT_TOKENS,B as MAX_SEARCH_QUERIES,e as MEMORY_CATEGORIES,j as MODELS_PER_PROVIDER,c as MODEL_ANTHROPIC_LOW,L as MODEL_ANTHROPIC_MEDIUM,I 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,M as MODEL_GOOGLE_MEDIUM,g as MODEL_GOOGLE_TOP,f as MODEL_HUMANIZE_AUDIT,U as MODEL_HUMANIZE_REWRITE,C as MODEL_MEMORY_INFERENCE,G as MODEL_NUTRITION_SEARCH,P as MODEL_OPENAI_MEDIUM,A as MODEL_OPENAI_TOP,d as MODEL_PERPLEXITY_SEARCH,y as MODEL_REVIEW_TRUST_PANEL,H as MODEL_REVIEW_TRUST_PANEL_GOOGLE,m as MODEL_SEARCH_DECOMPOSER,h as MODEL_SONAR,N as MODEL_SONAR_PRO,ei as PLAN_BASIC,eO as PLAN_PLUS,es as PLAN_PREMIUM,o as PROVIDER_ANTHROPIC,_ as PROVIDER_GOOGLE,R as PROVIDER_MEMORY,s as PROVIDER_OPENAI,S as PROVIDER_PERPLEXITY,q as PROVIDER_ROLE_MAP,l as PROVIDER_SUMMARY,Q as QUICK_ACCESS_NONE,$ as QUICK_ACCESS_PANELS,K as RESPONSE_SPEEDS,X as RESPONSE_SPEED_BALANCED,W as RESPONSE_SPEED_FAST,x as RESPONSE_SPEED_THOROUGH,z as RESPONSE_SPEED_TO_EFFORT,O as ROLE_ASSISTANT,a as ROLE_SYSTEM,i as ROLE_USER,Y as SEARCH_DECOMPOSE_TIMEOUT_MS,F as SEARCH_QUERY_TIMEOUT_MS,er as SORT_BY_TIMESTAMP,en as SORT_BY_TOKEN_USAGE,e_ as TOOL_LOADING_LABELS,eg as URL_READ_NOTE_PREFIX,ec as URL_READ_PART_TYPE,ey as findProvider,eT as getCompressionEmergencyThreshold,eB as getModelsGroupedByProvider,ew as getProvidersFromModels,eF as hasMultipleModelsPerProvider,ev as isEntitled,eD as isExplicitNewChatRequest,E as isHardCategory,eY as isModelAllowedForPlan,eU as isRealProvider,ek as isReasoningModel,ep as readUrlParts,eW as resolveQuickAccess,eV as resolveResponseSpeed,eG as stripAutoWrapper,n as ActionColor,eC as toUrlReadPart};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versini/sassysaint-common",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.65.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Arno Versini",
|
|
6
6
|
"publishConfig": {
|
|
@@ -12,6 +12,10 @@
|
|
|
12
12
|
"files": [
|
|
13
13
|
"dist"
|
|
14
14
|
],
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@microsoft/api-extractor": "7.59.4",
|
|
17
|
+
"@rslib/core": "1.0.3"
|
|
18
|
+
},
|
|
15
19
|
"scripts": {
|
|
16
20
|
"build:check": "tsc",
|
|
17
21
|
"build:common": "npm-run-all build",
|