@versini/sassysaint-common 4.45.0 → 4.47.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 +23 -16
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -7,13 +7,12 @@ export declare enum ActionColor {
|
|
|
7
7
|
Prompts = 1,
|
|
8
8
|
Attachment = 2,
|
|
9
9
|
PrivateChat = 3,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
Footer = 10
|
|
10
|
+
Send = 4,
|
|
11
|
+
Header = 5,
|
|
12
|
+
Provider = 6,
|
|
13
|
+
Logo = 7,
|
|
14
|
+
Placeholder = 8,
|
|
15
|
+
Footer = 9
|
|
17
16
|
}
|
|
18
17
|
|
|
19
18
|
/**
|
|
@@ -70,7 +69,6 @@ export declare const CAPABILITIES: {
|
|
|
70
69
|
};
|
|
71
70
|
readonly ADDON: {
|
|
72
71
|
readonly ATTACHMENTS: "addon:attachments";
|
|
73
|
-
readonly REASONING: "addon:reasoning";
|
|
74
72
|
readonly CODEINTERPRETER: "addon:codeinterpreter";
|
|
75
73
|
readonly SHARE_CHAT: "addon:share-chat";
|
|
76
74
|
};
|
|
@@ -523,6 +521,16 @@ export declare const MODEL_GPT5_NANO = "gpt-5.4-nano";
|
|
|
523
521
|
*/
|
|
524
522
|
export declare const MODEL_MEMORY_INFERENCE = "gpt-5.4-mini";
|
|
525
523
|
|
|
524
|
+
/**
|
|
525
|
+
* Pseudo-model id for the Perplexity Search API (getWebSearch). Deliberately
|
|
526
|
+
* does NOT start with "sonar": the pricing prefix-fallback would otherwise bill
|
|
527
|
+
* this token-less, flat-per-request endpoint at the sonar token rate. Search
|
|
528
|
+
* cost is tracked out-of-band via a Prometheus request counter, not through the
|
|
529
|
+
* token usage pipeline, so its pricing row is priced at zero (see
|
|
530
|
+
* modelPricing).
|
|
531
|
+
*/
|
|
532
|
+
export declare const MODEL_PERPLEXITY_SEARCH = "perplexity-search";
|
|
533
|
+
|
|
526
534
|
export declare const MODEL_SEARCH_DECOMPOSER = "gpt-5.4-mini";
|
|
527
535
|
|
|
528
536
|
export declare const MODEL_SONAR = "sonar";
|
|
@@ -538,7 +546,7 @@ export declare const MODELS_PER_PROVIDER: {
|
|
|
538
546
|
readonly OpenAI: readonly ["gpt-5.6-terra", "gpt-5.4-mini", "gpt-5.4-nano"];
|
|
539
547
|
readonly Anthropic: readonly ["claude-opus-4-8", "claude-haiku-4-5", "claude-sonnet-5"];
|
|
540
548
|
readonly Google: readonly ["gemini-3-flash-preview", "gemini-3.1-pro-preview"];
|
|
541
|
-
readonly Perplexity: readonly ["sonar", "sonar-pro"];
|
|
549
|
+
readonly Perplexity: readonly ["sonar", "sonar-pro", "perplexity-search"];
|
|
542
550
|
};
|
|
543
551
|
|
|
544
552
|
/**
|
|
@@ -607,14 +615,13 @@ export declare const ROLE_SYSTEM = "system";
|
|
|
607
615
|
export declare const ROLE_USER = "user";
|
|
608
616
|
|
|
609
617
|
/**
|
|
610
|
-
* Per-sub-query deadline for the parallel search fan-out.
|
|
611
|
-
*
|
|
612
|
-
*
|
|
613
|
-
*
|
|
614
|
-
*
|
|
615
|
-
* request.
|
|
618
|
+
* Per-sub-query deadline for the parallel search fan-out. The Perplexity Search
|
|
619
|
+
* API returns in ~1s (measured p100 ~1.4s over the migration spike), far below
|
|
620
|
+
* the 14-22s the retired sonar-pro chat model took, so the old 30s bound is now
|
|
621
|
+
* mostly a hang-detector. 10s leaves generous headroom over the observed tail
|
|
622
|
+
* while stopping a genuinely stuck request from holding the chat turn.
|
|
616
623
|
*/
|
|
617
|
-
export declare const SEARCH_QUERY_TIMEOUT_MS =
|
|
624
|
+
export declare const SEARCH_QUERY_TIMEOUT_MS = 10000;
|
|
618
625
|
|
|
619
626
|
/**
|
|
620
627
|
* Sort capabilities are shared across client and server.
|
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
|
|
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 i="system",O="user",o="assistant",a="OpenAI",_="Anthropic",R="Google",s="Summary",T="Memory",A="Perplexity",l="Mistral",S=a,I=[a,_,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="perplexity-search",p="openai/gpt-oss-20b:free",m="mistral-large-latest",G="gpt-5.4-mini",H="gpt-5.4-nano",f="gpt-5.4-mini",U="text-embedding-3-small",y="gemini-3-pro-image",Y=5,B=1e4,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",[h]:"Perplexity Search",[y]:"Nano Banana 3 Pro",[m]:"Mistral Large"},v=[M,L,P,g,N,d,D,c,y],F=[M,L,P,g,N,c],w={[a]:[M,L,P],[_]:[g,d,N],[R]:[D,c],[A]:[u,C,h]},V={[a]:[i,O,o],[_]:[O,o],[s]:[O,o],[T]:[O,o],[R]:[O,o],[A]:[O,o],[l]:[O,o]},X={[_]:["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",K="timestamp",z="tokenUsage",Z="Diggidy",j="sassy:basic",Q="sassy:plus",$="sassy:advanced",q={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"}},J={code_interpreter:"Running code...",web_search:"Searching the web...",[q.TOOL.WEATHER]:"Checking the weather...",[q.TOOL.POLLUTION]:"Fetching air pollution data...",[q.TOOL.BUNDLESIZE]:"Analyzing bundle size...",[q.TOOL.URLCONTENTPARSER]:"Reading a webpage...",[q.TOOL.WEBSEARCH]:"Searching the web...",[q.TOOL.GITREPOSITORY]:"Looking up repository...",[q.TOOL.HOTELS]:"Searching for hotels...",[q.TOOL.NUTRITION_FACTS]:"Fetching nutrition facts...",[q.TOOL.GENERATE_IMAGE]:"Generating image...",[q.TOOL.BARCODE]:"Looking up product...",[q.TOOL.PRONUNCIATION]:"Generating pronunciation...",[q.TOOL.HUMANIZE]:"Rewriting text...",[q.TOOL.IMAGES]:"Searching for images..."},ee="Using tools...",et=5e4,eE=1e5,er=8e5;function en(e){return e===$?er:eE}let ei=16384,eO=4,eo=3,ea="context-compression-summary",e_=new Set(["OpenAI",_,"Google",l]);function eR(e){return"string"==typeof e&&e_.has(e)}let es=/^auto \((.+)\)$/;function eT(e){let t=e.match(es);return t?t[1]:e}let eA=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,r]of Object.entries(w))r.includes(E)&&("OpenAI"===e||e===_||"Google"===e)&&t.add(e);return I.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,r]of Object.entries(w))if(r.includes(E)){t.has(e)||t.set(e,[]),t.get(e)?.push(E);break}return t},eI=e=>{for(let t of eS(e).values())if(t.length>1)return!0;return!1},eM=(e,t)=>!!e&&!!t&&0!==t.length&&t.includes(e);function eL(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 eP(e){return F.includes(e)}export{v as ALL_MODELS,I as ALL_PROVIDERS,F as ALL_REASONING_MODELS,Z as APPLICATION_NAME,X as APPROXIMATE_MODELS_PER_PROVIDER,q as CAPABILITIES,W as CHAT_COMPLETION_MARKER_KEY,eE as CONTEXT_COMPRESSION_EMERGENCY_THRESHOLD,er as CONTEXT_COMPRESSION_EMERGENCY_THRESHOLD_PREMIUM,eo as CONTEXT_COMPRESSION_KEEP_IMAGES,eO as CONTEXT_COMPRESSION_KEEP_RECENT,ea as CONTEXT_COMPRESSION_SUMMARY_ID,et as CONTEXT_COMPRESSION_THRESHOLD,S as DEFAULT_PROVIDER,ee as DEFAULT_TOOL_LOADING_LABEL,x as DIGGIDY_CHAT_ID_HEADER,k as DIGGIDY_CHAT_TIMESTAMP_HEADER,t as HARD_CATEGORIES,ei as MAX_OUTPUT_TOKENS,Y as MAX_SEARCH_QUERIES,e as MEMORY_CATEGORIES,w as MODELS_PER_PROVIDER,H as MODEL_CHAT_SUMMARY,d as MODEL_CLAUDE_HAIKU,g as MODEL_CLAUDE_OPUS,N as MODEL_CLAUDE_SONNET,p as MODEL_DEV,b as MODEL_DISPLAY_NAMES,U as MODEL_EMBEDDING_TEXT,D as MODEL_GEMINI_FLASH,c as MODEL_GEMINI_PRO,y as MODEL_GENERATE_IMAGE,M as MODEL_GPT5,L as MODEL_GPT5_MINI,P as MODEL_GPT5_NANO,G as MODEL_MEMORY_INFERENCE,h as MODEL_PERPLEXITY_SEARCH,f as MODEL_SEARCH_DECOMPOSER,u as MODEL_SONAR,C as MODEL_SONAR_PRO,m as MODEL_TEACHER,j as PLAN_BASIC,Q as PLAN_PLUS,$ as PLAN_PREMIUM,_ as PROVIDER_ANTHROPIC,R as PROVIDER_GOOGLE,T as PROVIDER_MEMORY,l as PROVIDER_MISTRAL,a as PROVIDER_OPENAI,A as PROVIDER_PERPLEXITY,V as PROVIDER_ROLE_MAP,s as PROVIDER_SUMMARY,o as ROLE_ASSISTANT,i as ROLE_SYSTEM,O as ROLE_USER,B as SEARCH_QUERY_TIMEOUT_MS,K as SORT_BY_TIMESTAMP,z as SORT_BY_TOKEN_USAGE,J as TOOL_LOADING_LABELS,eA as findProvider,en as getCompressionEmergencyThreshold,eS as getModelsGroupedByProvider,el as getProvidersFromModels,eI as hasMultipleModelsPerProvider,eL as isEntitled,E as isHardCategory,eM as isModelAllowedForPlan,eR as isRealProvider,eP as isReasoningModel,eT 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.47.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": "5837a2c8f83a525f7efa3350e49a978896abba5c"
|
|
36
36
|
}
|