chore: change default model from haiku to sonnet

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Alex Newman
2025-12-14 20:17:37 -05:00
parent f07eb17a33
commit 7ef93343a4
20 changed files with 29 additions and 29 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
"use strict";var Me=Object.create;var q=Object.defineProperty;var ke=Object.getOwnPropertyDescriptor;var $e=Object.getOwnPropertyNames;var Ue=Object.getPrototypeOf,xe=Object.prototype.hasOwnProperty;var we=(c,e)=>{for(var s in e)q(c,s,{get:e[s],enumerable:!0})},_e=(c,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of $e(e))!xe.call(c,n)&&n!==s&&q(c,n,{get:()=>e[n],enumerable:!(r=ke(e,n))||r.enumerable});return c};var Fe=(c,e,s)=>(s=c!=null?Me(Ue(c)):{},_e(e||!c||!c.__esModule?q(s,"default",{value:c,enumerable:!0}):s,c)),Pe=c=>_e(q({},"__esModule",{value:!0}),c);var ze={};we(ze,{generateContext:()=>Qe});module.exports=Pe(ze);var w=Fe(require("path"),1),z=require("os"),B=require("fs");var Ne=require("bun:sqlite");var O=require("path"),he=require("os"),be=require("fs");var fe=require("url");var j=require("fs"),ge=require("path"),Se=require("os");var te=["bugfix","feature","refactor","discovery","decision","change"],re=["how-it-works","why-it-exists","what-changed","problem-solution","gotcha","pattern","trade-off"],le={bugfix:"\u{1F534}",feature:"\u{1F7E3}",refactor:"\u{1F504}",change:"\u2705",discovery:"\u{1F535}",decision:"\u2696\uFE0F","session-request":"\u{1F3AF}"},me={discovery:"\u{1F50D}",change:"\u{1F6E0}\uFE0F",feature:"\u{1F6E0}\uFE0F",bugfix:"\u{1F6E0}\uFE0F",refactor:"\u{1F6E0}\uFE0F",decision:"\u2696\uFE0F"},Ee=te.join(","),Te=re.join(",");var ne=(i=>(i[i.DEBUG=0]="DEBUG",i[i.INFO=1]="INFO",i[i.WARN=2]="WARN",i[i.ERROR=3]="ERROR",i[i.SILENT=4]="SILENT",i))(ne||{}),oe=class{level=null;useColor;constructor(){this.useColor=process.stdout.isTTY??!1}getLevel(){if(this.level===null){let e=U.get("CLAUDE_MEM_LOG_LEVEL").toUpperCase();this.level=ne[e]??1}return this.level}correlationId(e,s){return`obs-${e}-${s}`}sessionId(e){return`session-${e}`}formatData(e){if(e==null)return"";if(typeof e=="string")return e;if(typeof e=="number"||typeof e=="boolean")return e.toString();if(typeof e=="object"){if(e instanceof Error)return this.getLevel()===0?`${e.message}
${e.stack}`:e.message;if(Array.isArray(e))return`[${e.length} items]`;let s=Object.keys(e);return s.length===0?"{}":s.length<=3?JSON.stringify(e):`{${s.length} keys: ${s.slice(0,3).join(", ")}...}`}return String(e)}formatTool(e,s){if(!s)return e;try{let r=typeof s=="string"?JSON.parse(s):s;if(e==="Bash"&&r.command){let n=r.command.length>50?r.command.substring(0,50)+"...":r.command;return`${e}(${n})`}if(e==="Read"&&r.file_path){let n=r.file_path.split("/").pop()||r.file_path;return`${e}(${n})`}if(e==="Edit"&&r.file_path){let n=r.file_path.split("/").pop()||r.file_path;return`${e}(${n})`}if(e==="Write"&&r.file_path){let n=r.file_path.split("/").pop()||r.file_path;return`${e}(${n})`}return e}catch{return e}}formatTimestamp(e){let s=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0"),i=String(e.getHours()).padStart(2,"0"),a=String(e.getMinutes()).padStart(2,"0"),d=String(e.getSeconds()).padStart(2,"0"),u=String(e.getMilliseconds()).padStart(3,"0");return`${s}-${r}-${n} ${i}:${a}:${d}.${u}`}log(e,s,r,n,i){if(e<this.getLevel())return;let a=this.formatTimestamp(new Date),d=ne[e].padEnd(5),u=s.padEnd(6),m="";n?.correlationId?m=`[${n.correlationId}] `:n?.sessionId&&(m=`[session-${n.sessionId}] `);let l="";i!=null&&(this.getLevel()===0&&typeof i=="object"?l=`
`+JSON.stringify(i,null,2):l=" "+this.formatData(i));let g="";if(n){let{sessionId:E,sdkSessionId:I,correlationId:T,...t}=n;Object.keys(t).length>0&&(g=` {${Object.entries(t).map(([R,f])=>`${R}=${f}`).join(", ")}}`)}let b=`[${a}] [${d}] [${u}] ${m}${r}${g}${l}`;e===3?console.error(b):console.log(b)}debug(e,s,r,n){this.log(0,e,s,r,n)}info(e,s,r,n){this.log(1,e,s,r,n)}warn(e,s,r,n){this.log(2,e,s,r,n)}error(e,s,r,n){this.log(3,e,s,r,n)}dataIn(e,s,r,n){this.info(e,`\u2192 ${s}`,r,n)}dataOut(e,s,r,n){this.info(e,`\u2190 ${s}`,r,n)}success(e,s,r,n){this.info(e,`\u2713 ${s}`,r,n)}failure(e,s,r,n){this.error(e,`\u2717 ${s}`,r,n)}timing(e,s,r,n){this.info(e,`\u23F1 ${s}`,n,{duration:`${r}ms`})}},$=new oe;var U=class{static DEFAULTS={CLAUDE_MEM_MODEL:"claude-haiku-4-5",CLAUDE_MEM_CONTEXT_OBSERVATIONS:"50",CLAUDE_MEM_WORKER_PORT:"37777",CLAUDE_MEM_WORKER_HOST:"127.0.0.1",CLAUDE_MEM_SKIP_TOOLS:"ListMcpResourcesTool,SlashCommand,Skill,TodoWrite,AskUserQuestion",CLAUDE_MEM_DATA_DIR:(0,ge.join)((0,Se.homedir)(),".claude-mem"),CLAUDE_MEM_LOG_LEVEL:"INFO",CLAUDE_MEM_PYTHON_VERSION:"3.13",CLAUDE_CODE_PATH:"",CLAUDE_MEM_CONTEXT_SHOW_READ_TOKENS:"true",CLAUDE_MEM_CONTEXT_SHOW_WORK_TOKENS:"true",CLAUDE_MEM_CONTEXT_SHOW_SAVINGS_AMOUNT:"true",CLAUDE_MEM_CONTEXT_SHOW_SAVINGS_PERCENT:"true",CLAUDE_MEM_CONTEXT_OBSERVATION_TYPES:Ee,CLAUDE_MEM_CONTEXT_OBSERVATION_CONCEPTS:Te,CLAUDE_MEM_CONTEXT_FULL_COUNT:"5",CLAUDE_MEM_CONTEXT_FULL_FIELD:"narrative",CLAUDE_MEM_CONTEXT_SESSION_COUNT:"10",CLAUDE_MEM_CONTEXT_SHOW_LAST_SUMMARY:"true",CLAUDE_MEM_CONTEXT_SHOW_LAST_MESSAGE:"false"};static getAllDefaults(){return{...this.DEFAULTS}}static get(e){return this.DEFAULTS[e]}static getInt(e){let s=this.get(e);return parseInt(s,10)}static getBool(e){return this.get(e)==="true"}static loadFromFile(e){if(!(0,j.existsSync)(e))return this.getAllDefaults();let s=(0,j.readFileSync)(e,"utf-8"),r=JSON.parse(s),n=r;if(r.env&&typeof r.env=="object"){n=r.env;try{(0,j.writeFileSync)(e,JSON.stringify(n,null,2),"utf-8"),$.info("SETTINGS","Migrated settings file from nested to flat schema",{settingsPath:e})}catch(a){$.warn("SETTINGS","Failed to auto-migrate settings file",{settingsPath:e},a)}}let i={...this.DEFAULTS};for(let a of Object.keys(this.DEFAULTS))n[a]!==void 0&&(i[a]=n[a]);return i}};var We={};function Xe(){return typeof __dirname<"u"?__dirname:(0,O.dirname)((0,fe.fileURLToPath)(We.url))}var us=Xe(),v=U.get("CLAUDE_MEM_DATA_DIR"),ie=process.env.CLAUDE_CONFIG_DIR||(0,O.join)((0,he.homedir)(),".claude"),_s=(0,O.join)(v,"archives"),ls=(0,O.join)(v,"logs"),ms=(0,O.join)(v,"trash"),Es=(0,O.join)(v,"backups"),Ts=(0,O.join)(v,"settings.json"),Oe=(0,O.join)(v,"claude-mem.db"),gs=(0,O.join)(v,"vector-db"),Ss=(0,O.join)(ie,"settings.json"),hs=(0,O.join)(ie,"commands"),bs=(0,O.join)(ie,"CLAUDE.md");function Re(c){(0,be.mkdirSync)(c,{recursive:!0})}var J=class{db;constructor(){Re(v),this.db=new Ne.Database(Oe),this.db.run("PRAGMA journal_mode = WAL"),this.db.run("PRAGMA synchronous = NORMAL"),this.db.run("PRAGMA foreign_keys = ON"),this.initializeSchema(),this.ensureWorkerPortColumn(),this.ensurePromptTrackingColumns(),this.removeSessionSummariesUniqueConstraint(),this.addObservationHierarchicalFields(),this.makeObservationsTextNullable(),this.createUserPromptsTable(),this.ensureDiscoveryTokensColumn()}initializeSchema(){try{this.db.run(`
`+JSON.stringify(i,null,2):l=" "+this.formatData(i));let g="";if(n){let{sessionId:E,sdkSessionId:I,correlationId:T,...t}=n;Object.keys(t).length>0&&(g=` {${Object.entries(t).map(([R,f])=>`${R}=${f}`).join(", ")}}`)}let b=`[${a}] [${d}] [${u}] ${m}${r}${g}${l}`;e===3?console.error(b):console.log(b)}debug(e,s,r,n){this.log(0,e,s,r,n)}info(e,s,r,n){this.log(1,e,s,r,n)}warn(e,s,r,n){this.log(2,e,s,r,n)}error(e,s,r,n){this.log(3,e,s,r,n)}dataIn(e,s,r,n){this.info(e,`\u2192 ${s}`,r,n)}dataOut(e,s,r,n){this.info(e,`\u2190 ${s}`,r,n)}success(e,s,r,n){this.info(e,`\u2713 ${s}`,r,n)}failure(e,s,r,n){this.error(e,`\u2717 ${s}`,r,n)}timing(e,s,r,n){this.info(e,`\u23F1 ${s}`,n,{duration:`${r}ms`})}},$=new oe;var U=class{static DEFAULTS={CLAUDE_MEM_MODEL:"claude-sonnet-4-5",CLAUDE_MEM_CONTEXT_OBSERVATIONS:"50",CLAUDE_MEM_WORKER_PORT:"37777",CLAUDE_MEM_WORKER_HOST:"127.0.0.1",CLAUDE_MEM_SKIP_TOOLS:"ListMcpResourcesTool,SlashCommand,Skill,TodoWrite,AskUserQuestion",CLAUDE_MEM_DATA_DIR:(0,ge.join)((0,Se.homedir)(),".claude-mem"),CLAUDE_MEM_LOG_LEVEL:"INFO",CLAUDE_MEM_PYTHON_VERSION:"3.13",CLAUDE_CODE_PATH:"",CLAUDE_MEM_CONTEXT_SHOW_READ_TOKENS:"true",CLAUDE_MEM_CONTEXT_SHOW_WORK_TOKENS:"true",CLAUDE_MEM_CONTEXT_SHOW_SAVINGS_AMOUNT:"true",CLAUDE_MEM_CONTEXT_SHOW_SAVINGS_PERCENT:"true",CLAUDE_MEM_CONTEXT_OBSERVATION_TYPES:Ee,CLAUDE_MEM_CONTEXT_OBSERVATION_CONCEPTS:Te,CLAUDE_MEM_CONTEXT_FULL_COUNT:"5",CLAUDE_MEM_CONTEXT_FULL_FIELD:"narrative",CLAUDE_MEM_CONTEXT_SESSION_COUNT:"10",CLAUDE_MEM_CONTEXT_SHOW_LAST_SUMMARY:"true",CLAUDE_MEM_CONTEXT_SHOW_LAST_MESSAGE:"false"};static getAllDefaults(){return{...this.DEFAULTS}}static get(e){return this.DEFAULTS[e]}static getInt(e){let s=this.get(e);return parseInt(s,10)}static getBool(e){return this.get(e)==="true"}static loadFromFile(e){if(!(0,j.existsSync)(e))return this.getAllDefaults();let s=(0,j.readFileSync)(e,"utf-8"),r=JSON.parse(s),n=r;if(r.env&&typeof r.env=="object"){n=r.env;try{(0,j.writeFileSync)(e,JSON.stringify(n,null,2),"utf-8"),$.info("SETTINGS","Migrated settings file from nested to flat schema",{settingsPath:e})}catch(a){$.warn("SETTINGS","Failed to auto-migrate settings file",{settingsPath:e},a)}}let i={...this.DEFAULTS};for(let a of Object.keys(this.DEFAULTS))n[a]!==void 0&&(i[a]=n[a]);return i}};var We={};function Xe(){return typeof __dirname<"u"?__dirname:(0,O.dirname)((0,fe.fileURLToPath)(We.url))}var us=Xe(),v=U.get("CLAUDE_MEM_DATA_DIR"),ie=process.env.CLAUDE_CONFIG_DIR||(0,O.join)((0,he.homedir)(),".claude"),_s=(0,O.join)(v,"archives"),ls=(0,O.join)(v,"logs"),ms=(0,O.join)(v,"trash"),Es=(0,O.join)(v,"backups"),Ts=(0,O.join)(v,"settings.json"),Oe=(0,O.join)(v,"claude-mem.db"),gs=(0,O.join)(v,"vector-db"),Ss=(0,O.join)(ie,"settings.json"),hs=(0,O.join)(ie,"commands"),bs=(0,O.join)(ie,"CLAUDE.md");function Re(c){(0,be.mkdirSync)(c,{recursive:!0})}var J=class{db;constructor(){Re(v),this.db=new Ne.Database(Oe),this.db.run("PRAGMA journal_mode = WAL"),this.db.run("PRAGMA synchronous = NORMAL"),this.db.run("PRAGMA foreign_keys = ON"),this.initializeSchema(),this.ensureWorkerPortColumn(),this.ensurePromptTrackingColumns(),this.removeSessionSummariesUniqueConstraint(),this.addObservationHierarchicalFields(),this.makeObservationsTextNullable(),this.createUserPromptsTable(),this.ensureDiscoveryTokensColumn()}initializeSchema(){try{this.db.run(`
CREATE TABLE IF NOT EXISTS schema_versions (
id INTEGER PRIMARY KEY,
version INTEGER UNIQUE NOT NULL,