@versini/sassysaint-common 4.48.1 → 4.49.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 +30 -18
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -56,7 +56,6 @@ export declare const APPROXIMATE_MODELS_PER_PROVIDER: {
|
|
|
56
56
|
readonly OpenAI: readonly ["gpt-", "o3", "o4"];
|
|
57
57
|
readonly Google: readonly ["gemini"];
|
|
58
58
|
readonly Perplexity: readonly ["sonar"];
|
|
59
|
-
readonly Mistral: readonly ["mistral"];
|
|
60
59
|
};
|
|
61
60
|
|
|
62
61
|
/**
|
|
@@ -207,7 +206,7 @@ export declare const DIGGIDY_CHAT_TIMESTAMP_HEADER = "x-diggidy-chat-timestamp";
|
|
|
207
206
|
* ```
|
|
208
207
|
*
|
|
209
208
|
*/
|
|
210
|
-
export declare const findProvider: (modelName: string) => null | typeof PROVIDER_ANTHROPIC | typeof
|
|
209
|
+
export declare const findProvider: (modelName: string) => null | typeof PROVIDER_ANTHROPIC | typeof PROVIDER_OPENAI | typeof PROVIDER_GOOGLE;
|
|
211
210
|
|
|
212
211
|
/**
|
|
213
212
|
* Resolve the emergency compression floor for a plan. Premium gets the high
|
|
@@ -572,10 +571,10 @@ export declare const MODEL_OPENAI_MEDIUM = "gpt-5.4-mini";
|
|
|
572
571
|
* and not user-selectable, and the role-purpose slots (MODEL_MEMORY_INFERENCE,
|
|
573
572
|
* MODEL_CHAT_SUMMARY, MODEL_SEARCH_DECOMPOSER, MODEL_HUMANIZE_REWRITE,
|
|
574
573
|
* MODEL_HUMANIZE_AUDIT, MODEL_NUTRITION_SEARCH, MODEL_EMBEDDING_TEXT,
|
|
575
|
-
* MODEL_GENERATE_IMAGE,
|
|
576
|
-
*
|
|
577
|
-
*
|
|
578
|
-
*
|
|
574
|
+
* MODEL_GENERATE_IMAGE, MODEL_DEV) are named for the job they do rather than a
|
|
575
|
+
* provider tier, so a bump there never renames them either. Anything that needs
|
|
576
|
+
* a specific model for a specific job belongs in that group, NOT pointed at a
|
|
577
|
+
* picker tier whose value can move.
|
|
579
578
|
*
|
|
580
579
|
*/
|
|
581
580
|
export declare const MODEL_OPENAI_TOP = "gpt-5.6-terra";
|
|
@@ -590,22 +589,29 @@ export declare const MODEL_OPENAI_TOP = "gpt-5.6-terra";
|
|
|
590
589
|
*/
|
|
591
590
|
export declare const MODEL_PERPLEXITY_SEARCH = "perplexity-search";
|
|
592
591
|
|
|
593
|
-
|
|
592
|
+
/**
|
|
593
|
+
* The decomposer sits in front of every complex search, so its latency is paid
|
|
594
|
+
* on the critical path before a single result exists. Measured over 7 fixtures
|
|
595
|
+
* x 3 runs (GH #3018): Flash-Lite p50 644ms / p90 720ms, against gpt-5.4-mini's
|
|
596
|
+
* p50 1186ms / p90 1515ms and gemini-3.6-flash's p50 2037ms — the Google TOP
|
|
597
|
+
* tier is SLOWER than either, so this slot must not be pointed at it.
|
|
598
|
+
* Flash-Lite also decomposed better, splitting on real axes (one query per
|
|
599
|
+
* country) where mini emitted near-duplicate rewordings of the whole question.
|
|
600
|
+
*/
|
|
601
|
+
export declare const MODEL_SEARCH_DECOMPOSER = "gemini-3.5-flash-lite";
|
|
594
602
|
|
|
595
603
|
export declare const MODEL_SONAR = "sonar";
|
|
596
604
|
|
|
597
605
|
export declare const MODEL_SONAR_PRO = "sonar-pro";
|
|
598
606
|
|
|
599
|
-
export declare const MODEL_TEACHER = "mistral-large-latest";
|
|
600
|
-
|
|
601
607
|
/**
|
|
602
608
|
* List of models available according to the providers.
|
|
603
609
|
*
|
|
604
|
-
*
|
|
605
|
-
*
|
|
606
|
-
*
|
|
607
|
-
*
|
|
608
|
-
*
|
|
610
|
+
* Order is NOT sorted by tier (Google lists MEDIUM first, Anthropic lists LOW
|
|
611
|
+
* before MEDIUM) but is no longer load-bearing: index [0] used to be the
|
|
612
|
+
* per-provider fallback default in getModelNameForPlan (server providers.ts),
|
|
613
|
+
* which fell open and served it to plans entitled to none of the provider's
|
|
614
|
+
* models. Model choice now comes from the plan's own allowedModels order.
|
|
609
615
|
*
|
|
610
616
|
*/
|
|
611
617
|
export declare const MODELS_PER_PROVIDER: {
|
|
@@ -639,8 +645,6 @@ export declare const PROVIDER_GOOGLE = "Google";
|
|
|
639
645
|
|
|
640
646
|
export declare const PROVIDER_MEMORY = "Memory";
|
|
641
647
|
|
|
642
|
-
export declare const PROVIDER_MISTRAL = "Mistral";
|
|
643
|
-
|
|
644
648
|
/**
|
|
645
649
|
* List of available providers.
|
|
646
650
|
*/
|
|
@@ -658,7 +662,6 @@ export declare const PROVIDER_ROLE_MAP: {
|
|
|
658
662
|
Memory: string[];
|
|
659
663
|
Google: string[];
|
|
660
664
|
Perplexity: string[];
|
|
661
|
-
Mistral: string[];
|
|
662
665
|
};
|
|
663
666
|
|
|
664
667
|
export declare const PROVIDER_SUMMARY = "Summary";
|
|
@@ -669,7 +672,7 @@ export declare const PROVIDER_SUMMARY = "Summary";
|
|
|
669
672
|
* `PROVIDER_ROLE_MAP`, or provider-branched logic. Runtime guards
|
|
670
673
|
* (`isRealProvider`) stay as backup for any `as any` escape hatches.
|
|
671
674
|
*/
|
|
672
|
-
export declare type RealProvider = typeof PROVIDER_OPENAI | typeof PROVIDER_ANTHROPIC | typeof PROVIDER_GOOGLE
|
|
675
|
+
export declare type RealProvider = typeof PROVIDER_OPENAI | typeof PROVIDER_ANTHROPIC | typeof PROVIDER_GOOGLE;
|
|
673
676
|
|
|
674
677
|
export declare const ROLE_ASSISTANT = "assistant";
|
|
675
678
|
|
|
@@ -680,6 +683,15 @@ export declare const ROLE_SYSTEM = "system";
|
|
|
680
683
|
|
|
681
684
|
export declare const ROLE_USER = "user";
|
|
682
685
|
|
|
686
|
+
/**
|
|
687
|
+
* Deadline for the decompose hop that runs before the searches. Kept well under
|
|
688
|
+
* SEARCH_QUERY_TIMEOUT_MS because this call is pure latency — nothing has been
|
|
689
|
+
* retrieved yet — and because a miss is cheap: the orchestrator falls back to
|
|
690
|
+
* searching the user's undecomposed question. 3s is generous headroom over the
|
|
691
|
+
* measured p90 of 720ms (GH #3018).
|
|
692
|
+
*/
|
|
693
|
+
export declare const SEARCH_DECOMPOSE_TIMEOUT_MS = 3000;
|
|
694
|
+
|
|
683
695
|
/**
|
|
684
696
|
* Per-sub-query deadline for the parallel search fan-out. The Perplexity Search
|
|
685
697
|
* API returns in ~1s (measured p100 ~1.4s over the migration spike), far below
|
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 O,
|
|
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 O,n=((O={})[O.NewChat=0]="NewChat",O[O.Prompts=1]="Prompts",O[O.Attachment=2]="Attachment",O[O.PrivateChat=3]="PrivateChat",O[O.Send=4]="Send",O[O.Header=5]="Header",O[O.Provider=6]="Provider",O[O.Logo=7]="Logo",O[O.Placeholder=8]="Placeholder",O[O.Footer=9]="Footer",O);let r="system",i="user",o="assistant",a="OpenAI",_="Anthropic",R="Google",T="Summary",s="Memory",A="Perplexity",I=a,M=[a,_,R],l="gpt-5.6-terra",S="gpt-5.4-mini",L="gpt-5.4-nano",P="claude-opus-4-8",g="claude-sonnet-5",N="claude-haiku-4-5",D="gemini-3.6-flash",d="gemini-3.5-flash-lite",c="sonar",u="sonar-pro",C="perplexity-search",h="openai/gpt-oss-20b:free",p="gpt-5.4-mini",m="gpt-5.4-nano",G="gemini-3.5-flash-lite",H="gemini-3.6-flash",f="gpt-5.6-terra",U="gpt-5.4-mini",y="text-embedding-3-small",Y="gemini-3-pro-image",B=5,b=1e4,F=3e3,v={[l]:"GPT-5.6 Terra",[S]:"GPT-5.4 Mini",[L]:"GPT-5.4 Nano",[P]:"Claude Opus 4.8",[g]:"Claude Sonnet 5",[N]:"Claude Haiku 4.5",[D]:"Gemini 3.6 Flash",[d]:"Gemini 3.5 Flash-Lite",[c]:"Sonar",[u]:"Sonar Pro",[C]:"Perplexity Search",[Y]:"Nano Banana 3 Pro"},w=[l,S,L,P,g,N,d,D,Y],V=[l,S,L,P,g,D,d],X={[a]:[l,S,L],[_]:[P,N,g],[R]:[d,D],[A]:[c,u,C]},W={[a]:[r,i,o],[_]:[i,o],[T]:[i,o],[s]:[i,o],[R]:[i,o],[A]:[i,o]},x={[_]:["claude-opus-4","claude-sonnet-5","claude-sonnet-4","claude-haiku-4","claude-3"],[a]:["gpt-","o3","o4"],[R]:["gemini"],[A]:["sonar"]},k="x-diggidy-chat-id",K="x-diggidy-chat-timestamp",Z="complete",z="timestamp",j="tokenUsage",Q="Diggidy",$="sassy:basic",q="sassy:plus",J="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",PRONUNCIATION:"getPronunciation",FRENCH_TEACHINGS:"getFrenchTeachings"},ADDON:{ATTACHMENTS:"addon:attachments",CODEINTERPRETER:"addon:codeinterpreter",SHARE_CHAT:"addon:share-chat"}},et={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.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..."},eE="Using tools...",eO=5e4,en=1e5,er=8e5;function ei(e){return e===J?er:en}let eo=16384,ea=4,e_=3,eR="context-compression-summary",eT=new Set(["OpenAI",_,"Google"]);function es(e){return"string"==typeof e&&eT.has(e)}let eA=/^auto \((.+)\)$/;function eI(e){let t=e.match(eA);return t?t[1]:e}let eM=e=>{for(let[t,E]of Object.entries(x))if(E.some(t=>e.startsWith(t)))return t;return null},el=e=>{if(!e||0===e.length)return[];let t=new Set;for(let E of e)for(let[e,O]of Object.entries(X))O.includes(E)&&("OpenAI"===e||e===_||"Google"===e)&&t.add(e);return M.filter(e=>t.has(e))},eS=e=>{let t=new Map;if(!e||0===e.length)return t;for(let E of e)for(let[e,O]of Object.entries(X))if(O.includes(E)){t.has(e)||t.set(e,[]),t.get(e)?.push(E);break}return t},eL=e=>{for(let t of eS(e).values())if(t.length>1)return!0;return!1},eP=(e,t)=>!!e&&!!t&&0!==t.length&&t.includes(e);function eg(e,t,E){if(!t||Array.isArray(t)&&0===t.length)return!0;let O=e instanceof Set?e:e?new Set(e):null;return!!O&&0!==O.size&&("string"==typeof t?O.has(t):E?.any===!0?t.some(e=>O.has(e)):t.every(e=>O.has(e)))}function eN(e){return V.includes(e)}export{w as ALL_MODELS,M as ALL_PROVIDERS,V as ALL_REASONING_MODELS,Q as APPLICATION_NAME,x as APPROXIMATE_MODELS_PER_PROVIDER,ee as CAPABILITIES,Z as CHAT_COMPLETION_MARKER_KEY,en as CONTEXT_COMPRESSION_EMERGENCY_THRESHOLD,er as CONTEXT_COMPRESSION_EMERGENCY_THRESHOLD_PREMIUM,e_ as CONTEXT_COMPRESSION_KEEP_IMAGES,ea as CONTEXT_COMPRESSION_KEEP_RECENT,eR as CONTEXT_COMPRESSION_SUMMARY_ID,eO as CONTEXT_COMPRESSION_THRESHOLD,I as DEFAULT_PROVIDER,eE as DEFAULT_TOOL_LOADING_LABEL,k as DIGGIDY_CHAT_ID_HEADER,K 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,N as MODEL_ANTHROPIC_LOW,g as MODEL_ANTHROPIC_MEDIUM,P as MODEL_ANTHROPIC_TOP,m as MODEL_CHAT_SUMMARY,h as MODEL_DEV,v as MODEL_DISPLAY_NAMES,y as MODEL_EMBEDDING_TEXT,Y as MODEL_GENERATE_IMAGE,d as MODEL_GOOGLE_MEDIUM,D as MODEL_GOOGLE_TOP,f as MODEL_HUMANIZE_AUDIT,H as MODEL_HUMANIZE_REWRITE,p as MODEL_MEMORY_INFERENCE,U as MODEL_NUTRITION_SEARCH,L as MODEL_OPENAI_LOW,S as MODEL_OPENAI_MEDIUM,l as MODEL_OPENAI_TOP,C as MODEL_PERPLEXITY_SEARCH,G as MODEL_SEARCH_DECOMPOSER,c as MODEL_SONAR,u as MODEL_SONAR_PRO,$ as PLAN_BASIC,q as PLAN_PLUS,J as PLAN_PREMIUM,_ as PROVIDER_ANTHROPIC,R as PROVIDER_GOOGLE,s as PROVIDER_MEMORY,a as PROVIDER_OPENAI,A as PROVIDER_PERPLEXITY,W as PROVIDER_ROLE_MAP,T as PROVIDER_SUMMARY,o as ROLE_ASSISTANT,r as ROLE_SYSTEM,i as ROLE_USER,F as SEARCH_DECOMPOSE_TIMEOUT_MS,b as SEARCH_QUERY_TIMEOUT_MS,z as SORT_BY_TIMESTAMP,j as SORT_BY_TOKEN_USAGE,et as TOOL_LOADING_LABELS,eM as findProvider,ei as getCompressionEmergencyThreshold,eS as getModelsGroupedByProvider,el as getProvidersFromModels,eL as hasMultipleModelsPerProvider,eg as isEntitled,E as isHardCategory,eP as isModelAllowedForPlan,es as isRealProvider,eN as isReasoningModel,eI as stripAutoWrapper,n as ActionColor};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versini/sassysaint-common",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.49.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": "
|
|
35
|
+
"gitHead": "c4ab5a4063c6e04f70231b010f7f6c3505a1d625"
|
|
36
36
|
}
|