@versini/sassysaint-common 4.44.0 → 4.46.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 -24
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -7,20 +7,19 @@ 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
|
/**
|
|
20
19
|
* List of all models available TODAY. This is used by the client to display the
|
|
21
20
|
* list of models.
|
|
22
21
|
*/
|
|
23
|
-
export declare const ALL_MODELS: readonly ["gpt-5.
|
|
22
|
+
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
23
|
|
|
25
24
|
export declare const ALL_PROVIDERS: readonly ["OpenAI", "Anthropic", "Google"];
|
|
26
25
|
|
|
@@ -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
|
};
|
|
@@ -113,6 +111,7 @@ export declare type ColorMap = Partial<Record<ActionColor, string>>;
|
|
|
113
111
|
* The default protects smaller (~128k) context windows. Premium plans unlock
|
|
114
112
|
* large-context (~1M token) models, so their floor is far higher — a flat low
|
|
115
113
|
* value would compress those chats needlessly early and defeat the opt-out.
|
|
114
|
+
*
|
|
116
115
|
*/
|
|
117
116
|
export declare const CONTEXT_COMPRESSION_EMERGENCY_THRESHOLD = 100000;
|
|
118
117
|
|
|
@@ -130,14 +129,14 @@ export declare const CONTEXT_COMPRESSION_KEEP_IMAGES = 3;
|
|
|
130
129
|
|
|
131
130
|
/**
|
|
132
131
|
* Number of recent messages to keep intact during compression (two
|
|
133
|
-
* user-assistant exchanges). Ensures the model has enough immediate
|
|
134
|
-
*
|
|
132
|
+
* user-assistant exchanges). Ensures the model has enough immediate context to
|
|
133
|
+
* continue the conversation coherently.
|
|
135
134
|
*/
|
|
136
135
|
export declare const CONTEXT_COMPRESSION_KEEP_RECENT = 4;
|
|
137
136
|
|
|
138
137
|
/**
|
|
139
|
-
* Stable ID assigned to the summary message produced by context
|
|
140
|
-
*
|
|
138
|
+
* Stable ID assigned to the summary message produced by context compression.
|
|
139
|
+
* Used to identify (and hide) the summary in the UI.
|
|
141
140
|
*/
|
|
142
141
|
export declare const CONTEXT_COMPRESSION_SUMMARY_ID = "context-compression-summary";
|
|
143
142
|
|
|
@@ -281,7 +280,8 @@ export declare const getProvidersFromModels: (models: string[]) => Array<typeof
|
|
|
281
280
|
* captured well. These auto-persist. Every other category is "soft" (vague
|
|
282
281
|
* preferences, one-off interests, behavioral asides) and only persists on an
|
|
283
282
|
* explicit "remember this" or after being seen in enough distinct chats — the
|
|
284
|
-
* precision-first stance (see `isPersistable`). Subset of {@link
|
|
283
|
+
* precision-first stance (see `isPersistable`). Subset of {@link
|
|
284
|
+
* MEMORY_CATEGORIES}.
|
|
285
285
|
*/
|
|
286
286
|
export declare const HARD_CATEGORIES: readonly ["identity", "bio", "constraint", "professional"];
|
|
287
287
|
|
|
@@ -457,24 +457,25 @@ export declare function isRealProvider(value: unknown): value is RealProvider;
|
|
|
457
457
|
export declare function isReasoningModel(model: string): boolean;
|
|
458
458
|
|
|
459
459
|
/**
|
|
460
|
-
* Cap per-step output tokens for streamText(). 16,384 is generous enough
|
|
461
|
-
*
|
|
462
|
-
*
|
|
460
|
+
* Cap per-step output tokens for streamText(). 16,384 is generous enough for
|
|
461
|
+
* any normal response but prevents runaway generation that burns tokens
|
|
462
|
+
* silently when the model loops or hits provider limits.
|
|
463
463
|
*/
|
|
464
464
|
export declare const MAX_OUTPUT_TOKENS = 16384;
|
|
465
465
|
|
|
466
466
|
export declare const MAX_SEARCH_QUERIES = 5;
|
|
467
467
|
|
|
468
468
|
/**
|
|
469
|
-
* Canonical long-term memory category enumeration. This is the single source
|
|
470
|
-
*
|
|
471
|
-
*
|
|
469
|
+
* Canonical long-term memory category enumeration. This is the single source of
|
|
470
|
+
* truth for memory categories across the whole stack: the Mongoose model enum,
|
|
471
|
+
* every Zod extraction/consolidation schema, and the per-category
|
|
472
472
|
* default-expiration (TTL) map all derive from this one array.
|
|
473
473
|
*
|
|
474
474
|
* It lives in the common layer (rather than the server's DB model) on purpose:
|
|
475
475
|
* the memory inference / consolidation code in `common/memory/` must reference
|
|
476
476
|
* the enum without importing from `services/db/models`, which would invert the
|
|
477
477
|
* intended dependency direction (model → common, never common → model).
|
|
478
|
+
*
|
|
478
479
|
*/
|
|
479
480
|
export declare const MEMORY_CATEGORIES: readonly ["preference", "identity", "constraint", "habit", "bio", "device", "location", "finance", "professional", "interest", "style", "behavior", "other"];
|
|
480
481
|
|
|
@@ -507,12 +508,17 @@ export declare const MODEL_GENERATE_IMAGE = "gemini-3-pro-image";
|
|
|
507
508
|
/**
|
|
508
509
|
* List of available models TODAY.
|
|
509
510
|
*/
|
|
510
|
-
export declare const MODEL_GPT5 = "gpt-5.
|
|
511
|
+
export declare const MODEL_GPT5 = "gpt-5.6-terra";
|
|
511
512
|
|
|
512
513
|
export declare const MODEL_GPT5_MINI = "gpt-5.4-mini";
|
|
513
514
|
|
|
514
515
|
export declare const MODEL_GPT5_NANO = "gpt-5.4-nano";
|
|
515
516
|
|
|
517
|
+
/**
|
|
518
|
+
* Bumped nano→mini (Track 2 T7): memory extraction now emits structured
|
|
519
|
+
* canonical keys, an explicit-request flag, and obeys the precision gate — nano
|
|
520
|
+
* was too weak for that reasoning; mini materially improves salience.
|
|
521
|
+
*/
|
|
516
522
|
export declare const MODEL_MEMORY_INFERENCE = "gpt-5.4-mini";
|
|
517
523
|
|
|
518
524
|
export declare const MODEL_SEARCH_DECOMPOSER = "gpt-5.4-mini";
|
|
@@ -527,7 +533,7 @@ export declare const MODEL_TEACHER = "mistral-large-latest";
|
|
|
527
533
|
* List of models available according to the providers.
|
|
528
534
|
*/
|
|
529
535
|
export declare const MODELS_PER_PROVIDER: {
|
|
530
|
-
readonly OpenAI: readonly ["gpt-5.
|
|
536
|
+
readonly OpenAI: readonly ["gpt-5.6-terra", "gpt-5.4-mini", "gpt-5.4-nano"];
|
|
531
537
|
readonly Anthropic: readonly ["claude-opus-4-8", "claude-haiku-4-5", "claude-sonnet-5"];
|
|
532
538
|
readonly Google: readonly ["gemini-3-flash-preview", "gemini-3.1-pro-preview"];
|
|
533
539
|
readonly Perplexity: readonly ["sonar", "sonar-pro"];
|
|
@@ -593,7 +599,6 @@ export declare const ROLE_ASSISTANT = "assistant";
|
|
|
593
599
|
|
|
594
600
|
/**
|
|
595
601
|
* Common utilities.
|
|
596
|
-
* List of available roles.
|
|
597
602
|
*/
|
|
598
603
|
export declare const ROLE_SYSTEM = "system";
|
|
599
604
|
|
|
@@ -604,7 +609,8 @@ export declare const ROLE_USER = "user";
|
|
|
604
609
|
* takes 14-22s to answer a decomposed query (it runs its own search + synthesis
|
|
605
610
|
* with medium context), so a tighter bound kills every sub-query before the
|
|
606
611
|
* provider responds and the whole search reports a false failure. 30s leaves
|
|
607
|
-
* headroom over the observed tail while still bounding a genuinely hung
|
|
612
|
+
* headroom over the observed tail while still bounding a genuinely hung
|
|
613
|
+
* request.
|
|
608
614
|
*/
|
|
609
615
|
export declare const SEARCH_QUERY_TIMEOUT_MS = 30000;
|
|
610
616
|
|
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",s="Google",R="Summary",T="Memory",A="Perplexity",l="Mistral",I=a,M=[a,_,s],S="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={[S]:"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=[S,L,P,g,N,d,D,c,U],v=[S,L,P,g,N,c],F={[a]:[S,L,P],[_]:[g,d,N],[s]:[D,c],[A]:[u,C]},w={[a]:[i,O,o],[_]:[O,o],[R]:[O,o],[T]:[O,o],[s]:[O,o],[A]:[O,o],[l]:[O,o]},V={[_]:["claude-opus-4","claude-sonnet-5","claude-sonnet-4","claude-haiku-4","claude-3"],[a]:["gpt-","o3","o4"],[s]:["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",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 er(e){return e===Q?eE:et}let en=16384,ei=4,eO=3,eo="context-compression-summary",ea=new Set(["OpenAI",_,"Google",l]);function e_(e){return"string"==typeof e&&ea.has(e)}let es=/^auto \((.+)\)$/;function eR(e){let t=e.match(es);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,r]of Object.entries(F))r.includes(E)&&("OpenAI"===e||e===_||"Google"===e)&&t.add(e);return M.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,r]of Object.entries(F))if(r.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},eM=(e,t)=>!!e&&!!t&&0!==t.length&&t.includes(e);function eS(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 eL(e){return v.includes(e)}export{b as ALL_MODELS,M 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,en 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,S 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,_ as PROVIDER_ANTHROPIC,s as PROVIDER_GOOGLE,T as PROVIDER_MEMORY,l as PROVIDER_MISTRAL,a as PROVIDER_OPENAI,A as PROVIDER_PERPLEXITY,w as PROVIDER_ROLE_MAP,R 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,er as getCompressionEmergencyThreshold,el as getModelsGroupedByProvider,eA as getProvidersFromModels,eI as hasMultipleModelsPerProvider,eS as isEntitled,E as isHardCategory,eM as isModelAllowedForPlan,e_ as isRealProvider,eL as isReasoningModel,eR 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.46.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": "562106b618d254e47dee7db2ec4f1f5ce8791667"
|
|
36
36
|
}
|