@versini/sassysaint-common 4.44.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 +24 -16
- package/dist/index.js +1 -1
- package/package.json +2 -2
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.
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
|
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
|
|
|
@@ -457,24 +459,25 @@ 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
|
-
*
|
|
462
|
-
*
|
|
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
|
-
*
|
|
471
|
-
*
|
|
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
|
|
|
@@ -507,12 +510,17 @@ export declare const MODEL_GENERATE_IMAGE = "gemini-3-pro-image";
|
|
|
507
510
|
/**
|
|
508
511
|
* List of available models TODAY.
|
|
509
512
|
*/
|
|
510
|
-
export declare const MODEL_GPT5 = "gpt-5.
|
|
513
|
+
export declare const MODEL_GPT5 = "gpt-5.6-terra";
|
|
511
514
|
|
|
512
515
|
export declare const MODEL_GPT5_MINI = "gpt-5.4-mini";
|
|
513
516
|
|
|
514
517
|
export declare const MODEL_GPT5_NANO = "gpt-5.4-nano";
|
|
515
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
|
+
*/
|
|
516
524
|
export declare const MODEL_MEMORY_INFERENCE = "gpt-5.4-mini";
|
|
517
525
|
|
|
518
526
|
export declare const MODEL_SEARCH_DECOMPOSER = "gpt-5.4-mini";
|
|
@@ -527,7 +535,7 @@ export declare const MODEL_TEACHER = "mistral-large-latest";
|
|
|
527
535
|
* List of models available according to the providers.
|
|
528
536
|
*/
|
|
529
537
|
export declare const MODELS_PER_PROVIDER: {
|
|
530
|
-
readonly OpenAI: readonly ["gpt-5.
|
|
538
|
+
readonly OpenAI: readonly ["gpt-5.6-terra", "gpt-5.4-mini", "gpt-5.4-nano"];
|
|
531
539
|
readonly Anthropic: readonly ["claude-opus-4-8", "claude-haiku-4-5", "claude-sonnet-5"];
|
|
532
540
|
readonly Google: readonly ["gemini-3-flash-preview", "gemini-3.1-pro-preview"];
|
|
533
541
|
readonly Perplexity: readonly ["sonar", "sonar-pro"];
|
|
@@ -593,7 +601,6 @@ export declare const ROLE_ASSISTANT = "assistant";
|
|
|
593
601
|
|
|
594
602
|
/**
|
|
595
603
|
* Common utilities.
|
|
596
|
-
* List of available roles.
|
|
597
604
|
*/
|
|
598
605
|
export declare const ROLE_SYSTEM = "system";
|
|
599
606
|
|
|
@@ -604,7 +611,8 @@ export declare const ROLE_USER = "user";
|
|
|
604
611
|
* takes 14-22s to answer a decomposed query (it runs its own search + synthesis
|
|
605
612
|
* with medium context), so a tighter bound kills every sub-query before the
|
|
606
613
|
* provider responds and the whole search reports a false failure. 30s leaves
|
|
607
|
-
* headroom over the observed tail while still bounding a genuinely hung
|
|
614
|
+
* headroom over the observed tail while still bounding a genuinely hung
|
|
615
|
+
* request.
|
|
608
616
|
*/
|
|
609
617
|
export declare const SEARCH_QUERY_TIMEOUT_MS = 30000;
|
|
610
618
|
|
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.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.
|
|
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.
|
|
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": "
|
|
35
|
+
"gitHead": "9b0aabf913a258f190b4ee0e4442cc9849737f16"
|
|
36
36
|
}
|