claude-mem 10.7.0 → 10.7.1
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/npx-cli/index.js
CHANGED
|
@@ -1,68 +1,80 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
var
|
|
3
|
-
`,"utf-8")}var
|
|
2
|
+
var Ar=Object.create;var Rt=Object.defineProperty;var wr=Object.getOwnPropertyDescriptor;var $r=Object.getOwnPropertyNames;var kr=Object.getPrototypeOf,Mr=Object.prototype.hasOwnProperty;var Ir=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,o)=>(typeof require<"u"?require:e)[o]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var p=(t,e)=>()=>(t&&(e=t(t=0)),e);var On=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),X=(t,e)=>{for(var o in e)Rt(t,o,{get:e[o],enumerable:!0})},Or=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of $r(e))!Mr.call(t,s)&&s!==o&&Rt(t,s,{get:()=>e[s],enumerable:!(r=wr(e,s))||r.enumerable});return t};var re=(t,e,o)=>(o=t!=null?Ar(kr(t)):{},Or(e||!t||!t.__esModule?Rt(o,"default",{value:t,enumerable:!0}):o,t));var me=On((Au,Pt)=>{var ot=process||{},Tn=ot.argv||[],nt=ot.env||{},Tr=!(nt.NO_COLOR||Tn.includes("--no-color"))&&(!!nt.FORCE_COLOR||Tn.includes("--color")||ot.platform==="win32"||(ot.stdout||{}).isTTY&&nt.TERM!=="dumb"||!!nt.CI),Br=(t,e,o=t)=>r=>{let s=""+r,i=s.indexOf(e,t.length);return~i?t+Rr(s,e,o,i)+e:t+s+e},Rr=(t,e,o,r)=>{let s="",i=0;do s+=t.substring(i,r)+o,i=r+e.length,r=t.indexOf(e,i);while(~r);return s+t.substring(i)},Bn=(t=Tr)=>{let e=t?Br:()=>String;return{isColorSupported:t,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};Pt.exports=Bn();Pt.exports.createColors=Bn});import{existsSync as Pr,readFileSync as Lr}from"fs";function j(t,e){if(!Pr(t))return e;try{return JSON.parse(Lr(t,"utf-8"))}catch{throw new Error(`Corrupt JSON file, refusing to overwrite: ${t}`)}}var be=p(()=>{"use strict"});import{existsSync as Ae,mkdirSync as jr,readFileSync as Rn,writeFileSync as Nr}from"fs";import{homedir as Ur}from"os";import{dirname as Pn,join as M}from"path";import{fileURLToPath as Gr}from"url";function Lt(){return process.env.CLAUDE_CONFIG_DIR||M(Ur(),".claude")}function w(){return M(Lt(),"plugins","marketplaces","thedotmack")}function se(){return M(Lt(),"plugins")}function pe(){return M(se(),"known_marketplaces.json")}function ge(){return M(se(),"installed_plugins.json")}function fe(){return M(Lt(),"settings.json")}function jt(t){return M(se(),"cache","thedotmack","claude-mem",t)}function rt(){let t=Gr(import.meta.url),e=M(Pn(t),"..","..");if(!Ae(M(e,"package.json")))throw new Error(`npmPackageRootDirectory: expected package.json at ${e}. Bundle structure may have changed \u2014 update the path walk.`);return e}function Nt(){return M(rt(),"plugin")}function we(){let t=M(Nt(),".claude-plugin","plugin.json");if(Ae(t))try{let o=JSON.parse(Rn(t,"utf-8"));if(o.version)return o.version}catch{}let e=M(rt(),"package.json");if(Ae(e))try{let o=JSON.parse(Rn(e,"utf-8"));if(o.version)return o.version}catch{}return"0.0.0"}function st(){let t=w();return Ae(M(t,"plugin",".claude-plugin","plugin.json"))}function $e(t){Ae(t)||jr(t,{recursive:!0})}function z(t,e){$e(Pn(t)),Nr(t,JSON.stringify(e,null,2)+`
|
|
3
|
+
`,"utf-8")}var Y,ie=p(()=>{"use strict";be();Y=process.platform==="win32"});var Gt=On((Ru,Ln)=>{"use strict";var Ut={to(t,e){return e?`\x1B[${e+1};${t+1}H`:`\x1B[${t+1}G`},move(t,e){let o="";return t<0?o+=`\x1B[${-t}D`:t>0&&(o+=`\x1B[${t}C`),e<0?o+=`\x1B[${-e}A`:e>0&&(o+=`\x1B[${e}B`),o},up:(t=1)=>`\x1B[${t}A`,down:(t=1)=>`\x1B[${t}B`,forward:(t=1)=>`\x1B[${t}C`,backward:(t=1)=>`\x1B[${t}D`,nextLine:(t=1)=>"\x1B[E".repeat(t),prevLine:(t=1)=>"\x1B[F".repeat(t),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},Wr={up:(t=1)=>"\x1B[S".repeat(t),down:(t=1)=>"\x1B[T".repeat(t)},Hr={screen:"\x1B[2J",up:(t=1)=>"\x1B[1J".repeat(t),down:(t=1)=>"\x1B[J".repeat(t),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(t){let e="";for(let o=0;o<t;o++)e+=this.line+(o<t-1?Ut.up():"");return t&&(e+=Ut.left),e}};Ln.exports={cursor:Ut,scroll:Wr,erase:Hr,beep:"\x07"}});import{stdin as Vn,stdout as Xn}from"node:process";import*as Z from"node:readline";import jn from"node:readline";import{WriteStream as Jr}from"node:tty";function Kr({onlyFirst:t=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}function Yn(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(Vr,"")}function qn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function ke(t,e={}){if(typeof t!="string"||t.length===0||(e={ambiguousIsNarrow:!0,...e},t=Yn(t),t.length===0))return 0;t=t.replace(zr()," ");let o=e.ambiguousIsNarrow?1:2,r=0;for(let s of t){let i=s.codePointAt(0);if(!(i<=31||i>=127&&i<=159||i>=768&&i<=879))switch(Yr.eastAsianWidth(s)){case"F":case"W":r+=2;break;case"A":r+=o;break;default:r+=1}}return r}function es(){let t=new Map;for(let[e,o]of Object.entries(f)){for(let[r,s]of Object.entries(o))f[r]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},o[r]=f[r],t.set(s[0],s[1]);Object.defineProperty(f,e,{value:o,enumerable:!1})}return Object.defineProperty(f,"codes",{value:t,enumerable:!1}),f.color.close="\x1B[39m",f.bgColor.close="\x1B[49m",f.color.ansi=Nn(),f.color.ansi256=Un(),f.color.ansi16m=Gn(),f.bgColor.ansi=Nn(Wt),f.bgColor.ansi256=Un(Wt),f.bgColor.ansi16m=Gn(Wt),Object.defineProperties(f,{rgbToAnsi256:{value:(e,o,r)=>e===o&&o===r?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(o/255*5)+Math.round(r/255*5),enumerable:!1},hexToRgb:{value:e=>{let o=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!o)return[0,0,0];let[r]=o;r.length===3&&(r=[...r].map(i=>i+i).join(""));let s=Number.parseInt(r,16);return[s>>16&255,s>>8&255,s&255]},enumerable:!1},hexToAnsi256:{value:e=>f.rgbToAnsi256(...f.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value:e=>{if(e<8)return 30+e;if(e<16)return 90+(e-8);let o,r,s;if(e>=232)o=((e-232)*10+8)/255,r=o,s=o;else{e-=16;let u=e%36;o=Math.floor(e/36)/5,r=Math.floor(u/6)/5,s=u%6/5}let i=Math.max(o,r,s)*2;if(i===0)return 30;let n=30+(Math.round(s)<<2|Math.round(r)<<1|Math.round(o));return i===2&&(n+=60),n},enumerable:!1},rgbToAnsi:{value:(e,o,r)=>f.ansi256ToAnsi(f.rgbToAnsi256(e,o,r)),enumerable:!1},hexToAnsi:{value:e=>f.ansi256ToAnsi(f.hexToAnsi256(e)),enumerable:!1}}),f}function Jn(t,e,o){return String(t).normalize().replace(/\r\n/g,`
|
|
4
4
|
`).split(`
|
|
5
|
-
`).map(r=>
|
|
6
|
-
`)}function
|
|
5
|
+
`).map(r=>is(r,e,o)).join(`
|
|
6
|
+
`)}function Xt(t,e){if(typeof t=="string")return ut.aliases.get(t)===e;for(let o of t)if(o!==void 0&&Xt(o,e))return!0;return!1}function as(t,e){if(t===e)return;let o=t.split(`
|
|
7
7
|
`),r=e.split(`
|
|
8
|
-
`),s=[];for(let u=0;u<Math.max(o.length,r.length);u++)o[u]!==r[u]&&s.push(u);return s}function me(n){return n===Et}function Pe(n,e){let o=n;o.isTTY&&o.setRawMode(e)}function hn({input:n=ln,output:e=mn,overwrite:o=!0,hideCursor:r=!0}={}){let s=H.createInterface({input:n,output:e,prompt:"",tabSize:1});H.emitKeypressEvents(n,s),n.isTTY&&n.setRawMode(!0);let u=(t,{name:i,sequence:c})=>{let D=String(t);if(vt([D,i,c],"cancel")){r&&e.write(E.cursor.show),process.exit(0);return}if(!o)return;H.moveCursor(e,i==="return"?0:-1,i==="return"?-1:0,()=>{H.clearLine(e,1,()=>{n.once("keypress",u)})})};return r&&e.write(E.cursor.hide),n.once("keypress",u),()=>{n.off("keypress",u),r&&e.write(E.cursor.show),n.isTTY&&!Or&&n.setRawMode(!1),s.terminal=!1,s.close()}}var E,Cr,gn,fr,hr,Er,Fr,ft,rn,sn,un,g,yr,xr,_r,Ue,Sr,yt,Cn,Ar,fn,xt,an,cn,br,ht,$r,wr,kr,je,Or,Et,Br,Tr,_,Ft,Ne,_t=p(()=>{E=X(Ct(),1);Cr=gr();gn={exports:{}};(function(n){var e={};n.exports=e,e.eastAsianWidth=function(r){var s=r.charCodeAt(0),u=r.length==2?r.charCodeAt(1):0,t=s;return 55296<=s&&s<=56319&&56320<=u&&u<=57343&&(s&=1023,u&=1023,t=s<<10|u,t+=65536),t==12288||65281<=t&&t<=65376||65504<=t&&t<=65510?"F":t==8361||65377<=t&&t<=65470||65474<=t&&t<=65479||65482<=t&&t<=65487||65490<=t&&t<=65495||65498<=t&&t<=65500||65512<=t&&t<=65518?"H":4352<=t&&t<=4447||4515<=t&&t<=4519||4602<=t&&t<=4607||9001<=t&&t<=9002||11904<=t&&t<=11929||11931<=t&&t<=12019||12032<=t&&t<=12245||12272<=t&&t<=12283||12289<=t&&t<=12350||12353<=t&&t<=12438||12441<=t&&t<=12543||12549<=t&&t<=12589||12593<=t&&t<=12686||12688<=t&&t<=12730||12736<=t&&t<=12771||12784<=t&&t<=12830||12832<=t&&t<=12871||12880<=t&&t<=13054||13056<=t&&t<=19903||19968<=t&&t<=42124||42128<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||55216<=t&&t<=55238||55243<=t&&t<=55291||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65106||65108<=t&&t<=65126||65128<=t&&t<=65131||110592<=t&&t<=110593||127488<=t&&t<=127490||127504<=t&&t<=127546||127552<=t&&t<=127560||127568<=t&&t<=127569||131072<=t&&t<=194367||177984<=t&&t<=196605||196608<=t&&t<=262141?"W":32<=t&&t<=126||162<=t&&t<=163||165<=t&&t<=166||t==172||t==175||10214<=t&&t<=10221||10629<=t&&t<=10630?"Na":t==161||t==164||167<=t&&t<=168||t==170||173<=t&&t<=174||176<=t&&t<=180||182<=t&&t<=186||188<=t&&t<=191||t==198||t==208||215<=t&&t<=216||222<=t&&t<=225||t==230||232<=t&&t<=234||236<=t&&t<=237||t==240||242<=t&&t<=243||247<=t&&t<=250||t==252||t==254||t==257||t==273||t==275||t==283||294<=t&&t<=295||t==299||305<=t&&t<=307||t==312||319<=t&&t<=322||t==324||328<=t&&t<=331||t==333||338<=t&&t<=339||358<=t&&t<=359||t==363||t==462||t==464||t==466||t==468||t==470||t==472||t==474||t==476||t==593||t==609||t==708||t==711||713<=t&&t<=715||t==717||t==720||728<=t&&t<=731||t==733||t==735||768<=t&&t<=879||913<=t&&t<=929||931<=t&&t<=937||945<=t&&t<=961||963<=t&&t<=969||t==1025||1040<=t&&t<=1103||t==1105||t==8208||8211<=t&&t<=8214||8216<=t&&t<=8217||8220<=t&&t<=8221||8224<=t&&t<=8226||8228<=t&&t<=8231||t==8240||8242<=t&&t<=8243||t==8245||t==8251||t==8254||t==8308||t==8319||8321<=t&&t<=8324||t==8364||t==8451||t==8453||t==8457||t==8467||t==8470||8481<=t&&t<=8482||t==8486||t==8491||8531<=t&&t<=8532||8539<=t&&t<=8542||8544<=t&&t<=8555||8560<=t&&t<=8569||t==8585||8592<=t&&t<=8601||8632<=t&&t<=8633||t==8658||t==8660||t==8679||t==8704||8706<=t&&t<=8707||8711<=t&&t<=8712||t==8715||t==8719||t==8721||t==8725||t==8730||8733<=t&&t<=8736||t==8739||t==8741||8743<=t&&t<=8748||t==8750||8756<=t&&t<=8759||8764<=t&&t<=8765||t==8776||t==8780||t==8786||8800<=t&&t<=8801||8804<=t&&t<=8807||8810<=t&&t<=8811||8814<=t&&t<=8815||8834<=t&&t<=8835||8838<=t&&t<=8839||t==8853||t==8857||t==8869||t==8895||t==8978||9312<=t&&t<=9449||9451<=t&&t<=9547||9552<=t&&t<=9587||9600<=t&&t<=9615||9618<=t&&t<=9621||9632<=t&&t<=9633||9635<=t&&t<=9641||9650<=t&&t<=9651||9654<=t&&t<=9655||9660<=t&&t<=9661||9664<=t&&t<=9665||9670<=t&&t<=9672||t==9675||9678<=t&&t<=9681||9698<=t&&t<=9701||t==9711||9733<=t&&t<=9734||t==9737||9742<=t&&t<=9743||9748<=t&&t<=9749||t==9756||t==9758||t==9792||t==9794||9824<=t&&t<=9825||9827<=t&&t<=9829||9831<=t&&t<=9834||9836<=t&&t<=9837||t==9839||9886<=t&&t<=9887||9918<=t&&t<=9919||9924<=t&&t<=9933||9935<=t&&t<=9953||t==9955||9960<=t&&t<=9983||t==10045||t==10071||10102<=t&&t<=10111||11093<=t&&t<=11097||12872<=t&&t<=12879||57344<=t&&t<=63743||65024<=t&&t<=65039||t==65533||127232<=t&&t<=127242||127248<=t&&t<=127277||127280<=t&&t<=127337||127344<=t&&t<=127386||917760<=t&&t<=917999||983040<=t&&t<=1048573||1048576<=t&&t<=1114109?"A":"N"},e.characterLength=function(r){var s=this.eastAsianWidth(r);return s=="F"||s=="W"||s=="A"?2:1};function o(r){return r.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}e.length=function(r){for(var s=o(r),u=0,t=0;t<s.length;t++)u=u+this.characterLength(s[t]);return u},e.slice=function(r,s,u){textLen=e.length(r),s=s||0,u=u||1,s<0&&(s=textLen+s),u<0&&(u=textLen+u);for(var t="",i=0,c=o(r),D=0;D<c.length;D++){var m=c[D],d=e.length(m);if(i>=s-(d==2?1:0))if(i+d<=u)t+=m;else break;i+=d}return t}})(gn);fr=gn.exports,hr=pn(fr),Er=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},Fr=pn(Er);ft=10,rn=(n=0)=>e=>`\x1B[${e+n}m`,sn=(n=0)=>e=>`\x1B[${38+n};5;${e}m`,un=(n=0)=>(e,o,r)=>`\x1B[${38+n};2;${e};${o};${r}m`,g={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(g.modifier);yr=Object.keys(g.color),xr=Object.keys(g.bgColor);[...yr,...xr];_r=vr(),Ue=new Set(["\x1B","\x9B"]),Sr=39,yt="\x07",Cn="[",Ar="]",fn="m",xt=`${Ar}8;;`,an=n=>`${Ue.values().next().value}${Cn}${n}${fn}`,cn=n=>`${Ue.values().next().value}${xt}${n}${yt}`,br=n=>n.split(" ").map(e=>le(e)),ht=(n,e,o)=>{let r=[...e],s=!1,u=!1,t=le(dn(n[n.length-1]));for(let[i,c]of r.entries()){let D=le(c);if(t+D<=o?n[n.length-1]+=c:(n.push(c),t=0),Ue.has(c)&&(s=!0,u=r.slice(i+1).join("").startsWith(xt)),s){u?c===yt&&(s=!1,u=!1):c===fn&&(s=!1);continue}t+=D,t===o&&i<r.length-1&&(n.push(""),t=0)}!t&&n[n.length-1].length>0&&n.length>1&&(n[n.length-2]+=n.pop())},$r=n=>{let e=n.split(" "),o=e.length;for(;o>0&&!(le(e[o-1])>0);)o--;return o===e.length?n:e.slice(0,o).join(" ")+e.slice(o).join("")},wr=(n,e,o={})=>{if(o.trim!==!1&&n.trim()==="")return"";let r="",s,u,t=br(n),i=[""];for(let[D,m]of n.split(" ").entries()){o.trim!==!1&&(i[i.length-1]=i[i.length-1].trimStart());let d=le(i[i.length-1]);if(D!==0&&(d>=e&&(o.wordWrap===!1||o.trim===!1)&&(i.push(""),d=0),(d>0||o.trim===!1)&&(i[i.length-1]+=" ",d++)),o.hard&&t[D]>e){let b=e-d,L=1+Math.floor((t[D]-b-1)/e);Math.floor((t[D]-1)/e)<L&&i.push(""),ht(i,m,e);continue}if(d+t[D]>e&&d>0&&t[D]>0){if(o.wordWrap===!1&&d<e){ht(i,m,e);continue}i.push("")}if(d+t[D]>e&&o.wordWrap===!1){ht(i,m,e);continue}i[i.length-1]+=m}o.trim!==!1&&(i=i.map(D=>$r(D)));let c=[...i.join(`
|
|
9
|
-
`)];for(let[D,
|
|
10
|
-
`?(
|
|
11
|
-
`&&(s&&
|
|
12
|
-
`),
|
|
13
|
-
`).length-1;this.output.write(
|
|
14
|
-
`);this.output.write(s[r]),this._prevFrame=e,this.output.write(
|
|
8
|
+
`),s=[];for(let i=0;i<Math.max(o.length,r.length);i++)o[i]!==r[i]&&s.push(i);return s}function Q(t){return t===Jt}function it(t,e){let o=t;o.isTTY&&o.setRawMode(e)}function eo({input:t=Vn,output:e=Xn,overwrite:o=!0,hideCursor:r=!0}={}){let s=Z.createInterface({input:t,output:e,prompt:"",tabSize:1});Z.emitKeypressEvents(t,s),t.isTTY&&t.setRawMode(!0);let i=(n,{name:u,sequence:c})=>{let D=String(n);if(Xt([D,u,c],"cancel")){r&&e.write(S.cursor.show),process.exit(0);return}if(!o)return;Z.moveCursor(e,u==="return"?0:-1,u==="return"?-1:0,()=>{Z.clearLine(e,1,()=>{t.once("keypress",i)})})};return r&&e.write(S.cursor.hide),t.once("keypress",i),()=>{t.off("keypress",i),r&&e.write(S.cursor.show),t.isTTY&&!cs&&t.setRawMode(!1),s.terminal=!1,s.close()}}var S,Vr,zn,Xr,Yr,qr,zr,Wt,Nn,Un,Gn,f,Zr,Qr,ts,lt,ns,Kt,Zn,os,Qn,Vt,Wn,Hn,rs,Ht,ss,is,us,ut,cs,Jt,ls,Ds,I,at,ct,ds,ms,Kn,to,Yt=p(()=>{S=re(Gt(),1);Vr=Kr();zn={exports:{}};(function(t){var e={};t.exports=e,e.eastAsianWidth=function(r){var s=r.charCodeAt(0),i=r.length==2?r.charCodeAt(1):0,n=s;return 55296<=s&&s<=56319&&56320<=i&&i<=57343&&(s&=1023,i&=1023,n=s<<10|i,n+=65536),n==12288||65281<=n&&n<=65376||65504<=n&&n<=65510?"F":n==8361||65377<=n&&n<=65470||65474<=n&&n<=65479||65482<=n&&n<=65487||65490<=n&&n<=65495||65498<=n&&n<=65500||65512<=n&&n<=65518?"H":4352<=n&&n<=4447||4515<=n&&n<=4519||4602<=n&&n<=4607||9001<=n&&n<=9002||11904<=n&&n<=11929||11931<=n&&n<=12019||12032<=n&&n<=12245||12272<=n&&n<=12283||12289<=n&&n<=12350||12353<=n&&n<=12438||12441<=n&&n<=12543||12549<=n&&n<=12589||12593<=n&&n<=12686||12688<=n&&n<=12730||12736<=n&&n<=12771||12784<=n&&n<=12830||12832<=n&&n<=12871||12880<=n&&n<=13054||13056<=n&&n<=19903||19968<=n&&n<=42124||42128<=n&&n<=42182||43360<=n&&n<=43388||44032<=n&&n<=55203||55216<=n&&n<=55238||55243<=n&&n<=55291||63744<=n&&n<=64255||65040<=n&&n<=65049||65072<=n&&n<=65106||65108<=n&&n<=65126||65128<=n&&n<=65131||110592<=n&&n<=110593||127488<=n&&n<=127490||127504<=n&&n<=127546||127552<=n&&n<=127560||127568<=n&&n<=127569||131072<=n&&n<=194367||177984<=n&&n<=196605||196608<=n&&n<=262141?"W":32<=n&&n<=126||162<=n&&n<=163||165<=n&&n<=166||n==172||n==175||10214<=n&&n<=10221||10629<=n&&n<=10630?"Na":n==161||n==164||167<=n&&n<=168||n==170||173<=n&&n<=174||176<=n&&n<=180||182<=n&&n<=186||188<=n&&n<=191||n==198||n==208||215<=n&&n<=216||222<=n&&n<=225||n==230||232<=n&&n<=234||236<=n&&n<=237||n==240||242<=n&&n<=243||247<=n&&n<=250||n==252||n==254||n==257||n==273||n==275||n==283||294<=n&&n<=295||n==299||305<=n&&n<=307||n==312||319<=n&&n<=322||n==324||328<=n&&n<=331||n==333||338<=n&&n<=339||358<=n&&n<=359||n==363||n==462||n==464||n==466||n==468||n==470||n==472||n==474||n==476||n==593||n==609||n==708||n==711||713<=n&&n<=715||n==717||n==720||728<=n&&n<=731||n==733||n==735||768<=n&&n<=879||913<=n&&n<=929||931<=n&&n<=937||945<=n&&n<=961||963<=n&&n<=969||n==1025||1040<=n&&n<=1103||n==1105||n==8208||8211<=n&&n<=8214||8216<=n&&n<=8217||8220<=n&&n<=8221||8224<=n&&n<=8226||8228<=n&&n<=8231||n==8240||8242<=n&&n<=8243||n==8245||n==8251||n==8254||n==8308||n==8319||8321<=n&&n<=8324||n==8364||n==8451||n==8453||n==8457||n==8467||n==8470||8481<=n&&n<=8482||n==8486||n==8491||8531<=n&&n<=8532||8539<=n&&n<=8542||8544<=n&&n<=8555||8560<=n&&n<=8569||n==8585||8592<=n&&n<=8601||8632<=n&&n<=8633||n==8658||n==8660||n==8679||n==8704||8706<=n&&n<=8707||8711<=n&&n<=8712||n==8715||n==8719||n==8721||n==8725||n==8730||8733<=n&&n<=8736||n==8739||n==8741||8743<=n&&n<=8748||n==8750||8756<=n&&n<=8759||8764<=n&&n<=8765||n==8776||n==8780||n==8786||8800<=n&&n<=8801||8804<=n&&n<=8807||8810<=n&&n<=8811||8814<=n&&n<=8815||8834<=n&&n<=8835||8838<=n&&n<=8839||n==8853||n==8857||n==8869||n==8895||n==8978||9312<=n&&n<=9449||9451<=n&&n<=9547||9552<=n&&n<=9587||9600<=n&&n<=9615||9618<=n&&n<=9621||9632<=n&&n<=9633||9635<=n&&n<=9641||9650<=n&&n<=9651||9654<=n&&n<=9655||9660<=n&&n<=9661||9664<=n&&n<=9665||9670<=n&&n<=9672||n==9675||9678<=n&&n<=9681||9698<=n&&n<=9701||n==9711||9733<=n&&n<=9734||n==9737||9742<=n&&n<=9743||9748<=n&&n<=9749||n==9756||n==9758||n==9792||n==9794||9824<=n&&n<=9825||9827<=n&&n<=9829||9831<=n&&n<=9834||9836<=n&&n<=9837||n==9839||9886<=n&&n<=9887||9918<=n&&n<=9919||9924<=n&&n<=9933||9935<=n&&n<=9953||n==9955||9960<=n&&n<=9983||n==10045||n==10071||10102<=n&&n<=10111||11093<=n&&n<=11097||12872<=n&&n<=12879||57344<=n&&n<=63743||65024<=n&&n<=65039||n==65533||127232<=n&&n<=127242||127248<=n&&n<=127277||127280<=n&&n<=127337||127344<=n&&n<=127386||917760<=n&&n<=917999||983040<=n&&n<=1048573||1048576<=n&&n<=1114109?"A":"N"},e.characterLength=function(r){var s=this.eastAsianWidth(r);return s=="F"||s=="W"||s=="A"?2:1};function o(r){return r.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}e.length=function(r){for(var s=o(r),i=0,n=0;n<s.length;n++)i=i+this.characterLength(s[n]);return i},e.slice=function(r,s,i){textLen=e.length(r),s=s||0,i=i||1,s<0&&(s=textLen+s),i<0&&(i=textLen+i);for(var n="",u=0,c=o(r),D=0;D<c.length;D++){var d=c[D],l=e.length(d);if(u>=s-(l==2?1:0))if(u+l<=i)n+=d;else break;u+=l}return n}})(zn);Xr=zn.exports,Yr=qn(Xr),qr=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},zr=qn(qr);Wt=10,Nn=(t=0)=>e=>`\x1B[${e+t}m`,Un=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,Gn=(t=0)=>(e,o,r)=>`\x1B[${38+t};2;${e};${o};${r}m`,f={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(f.modifier);Zr=Object.keys(f.color),Qr=Object.keys(f.bgColor);[...Zr,...Qr];ts=es(),lt=new Set(["\x1B","\x9B"]),ns=39,Kt="\x07",Zn="[",os="]",Qn="m",Vt=`${os}8;;`,Wn=t=>`${lt.values().next().value}${Zn}${t}${Qn}`,Hn=t=>`${lt.values().next().value}${Vt}${t}${Kt}`,rs=t=>t.split(" ").map(e=>ke(e)),Ht=(t,e,o)=>{let r=[...e],s=!1,i=!1,n=ke(Yn(t[t.length-1]));for(let[u,c]of r.entries()){let D=ke(c);if(n+D<=o?t[t.length-1]+=c:(t.push(c),n=0),lt.has(c)&&(s=!0,i=r.slice(u+1).join("").startsWith(Vt)),s){i?c===Kt&&(s=!1,i=!1):c===Qn&&(s=!1);continue}n+=D,n===o&&u<r.length-1&&(t.push(""),n=0)}!n&&t[t.length-1].length>0&&t.length>1&&(t[t.length-2]+=t.pop())},ss=t=>{let e=t.split(" "),o=e.length;for(;o>0&&!(ke(e[o-1])>0);)o--;return o===e.length?t:e.slice(0,o).join(" ")+e.slice(o).join("")},is=(t,e,o={})=>{if(o.trim!==!1&&t.trim()==="")return"";let r="",s,i,n=rs(t),u=[""];for(let[D,d]of t.split(" ").entries()){o.trim!==!1&&(u[u.length-1]=u[u.length-1].trimStart());let l=ke(u[u.length-1]);if(D!==0&&(l>=e&&(o.wordWrap===!1||o.trim===!1)&&(u.push(""),l=0),(l>0||o.trim===!1)&&(u[u.length-1]+=" ",l++)),o.hard&&n[D]>e){let y=e-l,v=1+Math.floor((n[D]-y-1)/e);Math.floor((n[D]-1)/e)<v&&u.push(""),Ht(u,d,e);continue}if(l+n[D]>e&&l>0&&n[D]>0){if(o.wordWrap===!1&&l<e){Ht(u,d,e);continue}u.push("")}if(l+n[D]>e&&o.wordWrap===!1){Ht(u,d,e);continue}u[u.length-1]+=d}o.trim!==!1&&(u=u.map(D=>ss(D)));let c=[...u.join(`
|
|
9
|
+
`)];for(let[D,d]of c.entries()){if(r+=d,lt.has(d)){let{groups:y}=new RegExp(`(?:\\${Zn}(?<code>\\d+)m|\\${Vt}(?<uri>.*)${Kt})`).exec(c.slice(D).join(""))||{groups:{}};if(y.code!==void 0){let v=Number.parseFloat(y.code);s=v===ns?void 0:v}else y.uri!==void 0&&(i=y.uri.length===0?void 0:y.uri)}let l=ts.codes.get(Number(s));c[D+1]===`
|
|
10
|
+
`?(i&&(r+=Hn("")),s&&l&&(r+=Wn(l))):d===`
|
|
11
|
+
`&&(s&&l&&(r+=Wn(s)),i&&(r+=Hn(i)))}return r};us=["up","down","left","right","space","enter","cancel"],ut={actions:new Set(us),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]])};cs=globalThis.process.platform.startsWith("win"),Jt=Symbol("clack:cancel");ls=Object.defineProperty,Ds=(t,e,o)=>e in t?ls(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,I=(t,e,o)=>(Ds(t,typeof e!="symbol"?e+"":e,o),o),at=class{constructor(e,o=!0){I(this,"input"),I(this,"output"),I(this,"_abortSignal"),I(this,"rl"),I(this,"opts"),I(this,"_render"),I(this,"_track",!1),I(this,"_prevFrame",""),I(this,"_subscribers",new Map),I(this,"_cursor",0),I(this,"state","initial"),I(this,"error",""),I(this,"value");let{input:r=Vn,output:s=Xn,render:i,signal:n,...u}=e;this.opts=u,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=i.bind(this),this._track=o,this._abortSignal=n,this.input=r,this.output=s}unsubscribe(){this._subscribers.clear()}setSubscriber(e,o){let r=this._subscribers.get(e)??[];r.push(o),this._subscribers.set(e,r)}on(e,o){this.setSubscriber(e,{cb:o})}once(e,o){this.setSubscriber(e,{cb:o,once:!0})}emit(e,...o){let r=this._subscribers.get(e)??[],s=[];for(let i of r)i.cb(...o),i.once&&s.push(()=>r.splice(r.indexOf(i),1));for(let i of s)i()}prompt(){return new Promise((e,o)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),e(Jt);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}let r=new Jr(0);r._write=(s,i,n)=>{this._track&&(this.value=this.rl?.line.replace(/\t/g,""),this._cursor=this.rl?.cursor??0,this.emit("value",this.value)),n()},this.input.pipe(r),this.rl=jn.createInterface({input:this.input,output:r,tabSize:2,prompt:"",escapeCodeTimeout:50}),jn.emitKeypressEvents(this.input,this.rl),this.rl.prompt(),this.opts.initialValue!==void 0&&this._track&&this.rl.write(this.opts.initialValue),this.input.on("keypress",this.onKeypress),it(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(S.cursor.show),this.output.off("resize",this.render),it(this.input,!1),e(this.value)}),this.once("cancel",()=>{this.output.write(S.cursor.show),this.output.off("resize",this.render),it(this.input,!1),e(Jt)})})}onKeypress(e,o){if(this.state==="error"&&(this.state="active"),o?.name&&(!this._track&&ut.aliases.has(o.name)&&this.emit("cursor",ut.aliases.get(o.name)),ut.actions.has(o.name)&&this.emit("cursor",o.name)),e&&(e.toLowerCase()==="y"||e.toLowerCase()==="n")&&this.emit("confirm",e.toLowerCase()==="y"),e===" "&&this.opts.placeholder&&(this.value||(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),e&&this.emit("key",e.toLowerCase()),o?.name==="return"){if(this.opts.validate){let r=this.opts.validate(this.value);r&&(this.error=r instanceof Error?r.message:r,this.state="error",this.rl?.write(this.value))}this.state!=="error"&&(this.state="submit")}Xt([e,o?.name,o?.sequence],"cancel")&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
|
|
12
|
+
`),it(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let e=Jn(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
|
|
13
|
+
`).length-1;this.output.write(S.cursor.move(-999,e*-1))}render(){let e=Jn(this._render(this)??"",process.stdout.columns,{hard:!0});if(e!==this._prevFrame){if(this.state==="initial")this.output.write(S.cursor.hide);else{let o=as(this._prevFrame,e);if(this.restoreCursor(),o&&o?.length===1){let r=o[0];this.output.write(S.cursor.move(0,r)),this.output.write(S.erase.lines(1));let s=e.split(`
|
|
14
|
+
`);this.output.write(s[r]),this._prevFrame=e,this.output.write(S.cursor.move(0,s.length-r-1));return}if(o&&o?.length>1){let r=o[0];this.output.write(S.cursor.move(0,r)),this.output.write(S.erase.down());let s=e.split(`
|
|
15
15
|
`).slice(r);this.output.write(s.join(`
|
|
16
|
-
`)),this._prevFrame=e;return}this.output.write(
|
|
17
|
-
${
|
|
18
|
-
`,s=this.value?e:o;switch(this.state){case"submit":return`${r}${a.default.gray(
|
|
19
|
-
${a.default.gray(
|
|
20
|
-
${a.default.cyan(
|
|
21
|
-
`}}}).prompt()},
|
|
22
|
-
${
|
|
16
|
+
`)),this._prevFrame=e;return}this.output.write(S.erase.down())}this.output.write(e),this.state==="initial"&&(this.state="active"),this._prevFrame=e}}},ct=class extends at{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(e){super(e,!1),this.value=!!e.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",o=>{this.output.write(S.cursor.move(0,-1)),this.value=o,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}},ds=Object.defineProperty,ms=(t,e,o)=>e in t?ds(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,Kn=(t,e,o)=>(ms(t,typeof e!="symbol"?e+"":e,o),o),to=class extends at{constructor(t){super(t,!1),Kn(this,"options"),Kn(this,"cursor",0),this.options=t.options,this.value=[...t.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:e})=>e===t.cursorAt),0),this.on("key",e=>{e==="a"&&this.toggleAll()}),this.on("cursor",e=>{switch(e){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break;case"space":this.toggleValue();break}})}get _value(){return this.options[this.cursor].value}toggleAll(){let t=this.value.length===this.options.length;this.value=t?[]:this.options.map(e=>e.value)}toggleValue(){let t=this.value.includes(this._value);this.value=t?this.value.filter(e=>e!==this._value):[...this.value,this._value]}}});import{stripVTControlCharacters as qt}from"node:util";import N from"node:process";function ps(){return N.platform!=="win32"?N.env.TERM!=="linux":!!N.env.CI||!!N.env.WT_SESSION||!!N.env.TERMINUS_SUBLIME||N.env.ConEmuTask==="{cmd::Cmder}"||N.env.TERM_PROGRAM==="Terminus-Sublime"||N.env.TERM_PROGRAM==="vscode"||N.env.TERM==="xterm-256color"||N.env.TERM==="alacritty"||N.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var a,Dt,zt,E,gs,uo,ao,dt,fs,h,Me,no,oo,Cs,ro,hs,zu,so,Es,Fs,ys,xs,vs,Ss,_s,co,io,Ie,lo,Oe,Te,mt,ue,b,bs,pt,Zt=p(()=>{Yt();Yt();a=re(me(),1),Dt=re(Gt(),1);zt=ps(),E=(t,e)=>zt?t:e,gs=E("\u25C6","*"),uo=E("\u25A0","x"),ao=E("\u25B2","x"),dt=E("\u25C7","o"),fs=E("\u250C","T"),h=E("\u2502","|"),Me=E("\u2514","\u2014"),no=E("\u25CF",">"),oo=E("\u25CB"," "),Cs=E("\u25FB","[\u2022]"),ro=E("\u25FC","[+]"),hs=E("\u25FB","[ ]"),zu=E("\u25AA","\u2022"),so=E("\u2500","-"),Es=E("\u256E","+"),Fs=E("\u251C","+"),ys=E("\u256F","+"),xs=E("\u25CF","\u2022"),vs=E("\u25C6","*"),Ss=E("\u25B2","!"),_s=E("\u25A0","x"),co=t=>{switch(t){case"initial":case"active":return a.default.cyan(gs);case"cancel":return a.default.red(uo);case"error":return a.default.yellow(ao);case"submit":return a.default.green(dt)}},io=t=>{let{cursor:e,options:o,style:r}=t,s=t.maxItems??Number.POSITIVE_INFINITY,i=Math.max(process.stdout.rows-4,0),n=Math.min(i,Math.max(s,5)),u=0;e>=u+n-3?u=Math.max(Math.min(e-n+3,o.length-n),0):e<u+2&&(u=Math.max(e-2,0));let c=n<o.length&&u>0,D=n<o.length&&u+n<o.length;return o.slice(u,u+n).map((d,l,y)=>{let v=l===0&&c,de=l===y.length-1&&D;return v||de?a.default.dim("..."):r(d,l+u===e)})},Ie=t=>{let e=t.active??"Yes",o=t.inactive??"No";return new ct({active:e,inactive:o,initialValue:t.initialValue??!0,render(){let r=`${a.default.gray(h)}
|
|
17
|
+
${co(this.state)} ${t.message}
|
|
18
|
+
`,s=this.value?e:o;switch(this.state){case"submit":return`${r}${a.default.gray(h)} ${a.default.dim(s)}`;case"cancel":return`${r}${a.default.gray(h)} ${a.default.strikethrough(a.default.dim(s))}
|
|
19
|
+
${a.default.gray(h)}`;default:return`${r}${a.default.cyan(h)} ${this.value?`${a.default.green(no)} ${e}`:`${a.default.dim(oo)} ${a.default.dim(e)}`} ${a.default.dim("/")} ${this.value?`${a.default.dim(oo)} ${a.default.dim(o)}`:`${a.default.green(no)} ${o}`}
|
|
20
|
+
${a.default.cyan(Me)}
|
|
21
|
+
`}}}).prompt()},lo=t=>{let e=(o,r)=>{let s=o.label??String(o.value);return r==="active"?`${a.default.cyan(Cs)} ${s} ${o.hint?a.default.dim(`(${o.hint})`):""}`:r==="selected"?`${a.default.green(ro)} ${a.default.dim(s)}`:r==="cancelled"?`${a.default.strikethrough(a.default.dim(s))}`:r==="active-selected"?`${a.default.green(ro)} ${s} ${o.hint?a.default.dim(`(${o.hint})`):""}`:r==="submitted"?`${a.default.dim(s)}`:`${a.default.dim(hs)} ${a.default.dim(s)}`};return new to({options:t.options,initialValues:t.initialValues,required:t.required??!0,cursorAt:t.cursorAt,validate(o){if(this.required&&o.length===0)return`Please select at least one option.
|
|
22
|
+
${a.default.reset(a.default.dim(`Press ${a.default.gray(a.default.bgWhite(a.default.inverse(" space ")))} to select, ${a.default.gray(a.default.bgWhite(a.default.inverse(" enter ")))} to submit`))}`},render(){let o=`${a.default.gray(h)}
|
|
23
|
+
${co(this.state)} ${t.message}
|
|
24
|
+
`,r=(s,i)=>{let n=this.value.includes(s.value);return i&&n?e(s,"active-selected"):n?e(s,"selected"):e(s,i?"active":"inactive")};switch(this.state){case"submit":return`${o}${a.default.gray(h)} ${this.options.filter(({value:s})=>this.value.includes(s)).map(s=>e(s,"submitted")).join(a.default.dim(", "))||a.default.dim("none")}`;case"cancel":{let s=this.options.filter(({value:i})=>this.value.includes(i)).map(i=>e(i,"cancelled")).join(a.default.dim(", "));return`${o}${a.default.gray(h)} ${s.trim()?`${s}
|
|
25
|
+
${a.default.gray(h)}`:""}`}case"error":{let s=this.error.split(`
|
|
26
|
+
`).map((i,n)=>n===0?`${a.default.yellow(Me)} ${a.default.yellow(i)}`:` ${i}`).join(`
|
|
27
|
+
`);return`${o+a.default.yellow(h)} ${io({options:this.options,cursor:this.cursor,maxItems:t.maxItems,style:r}).join(`
|
|
28
|
+
${a.default.yellow(h)} `)}
|
|
29
|
+
${s}
|
|
30
|
+
`}default:return`${o}${a.default.cyan(h)} ${io({options:this.options,cursor:this.cursor,maxItems:t.maxItems,style:r}).join(`
|
|
31
|
+
${a.default.cyan(h)} `)}
|
|
32
|
+
${a.default.cyan(Me)}
|
|
33
|
+
`}}}).prompt()},Oe=(t="",e="")=>{let o=`
|
|
34
|
+
${t}
|
|
23
35
|
`.split(`
|
|
24
|
-
`),r=
|
|
25
|
-
`);process.stdout.write(`${a.default.gray(
|
|
26
|
-
${a.default.green(
|
|
27
|
-
${
|
|
28
|
-
${a.default.gray(
|
|
29
|
-
`)},
|
|
30
|
-
|
|
31
|
-
`)},
|
|
32
|
-
`)},
|
|
33
|
-
${a.default.gray(
|
|
34
|
-
|
|
35
|
-
`)},
|
|
36
|
-
`);o.push(`${e} ${r}`,...s.map(
|
|
36
|
+
`),r=qt(e).length,s=Math.max(o.reduce((n,u)=>{let c=qt(u);return c.length>n?c.length:n},0),r)+2,i=o.map(n=>`${a.default.gray(h)} ${a.default.dim(n)}${" ".repeat(s-qt(n).length)}${a.default.gray(h)}`).join(`
|
|
37
|
+
`);process.stdout.write(`${a.default.gray(h)}
|
|
38
|
+
${a.default.green(dt)} ${a.default.reset(e)} ${a.default.gray(so.repeat(Math.max(s-r-1,1))+Es)}
|
|
39
|
+
${i}
|
|
40
|
+
${a.default.gray(Fs+so.repeat(s+2)+ys)}
|
|
41
|
+
`)},Te=(t="")=>{process.stdout.write(`${a.default.gray(Me)} ${a.default.red(t)}
|
|
42
|
+
|
|
43
|
+
`)},mt=(t="")=>{process.stdout.write(`${a.default.gray(fs)} ${t}
|
|
44
|
+
`)},ue=(t="")=>{process.stdout.write(`${a.default.gray(h)}
|
|
45
|
+
${a.default.gray(Me)} ${t}
|
|
46
|
+
|
|
47
|
+
`)},b={message:(t="",{symbol:e=a.default.gray(h)}={})=>{let o=[`${a.default.gray(h)}`];if(t){let[r,...s]=t.split(`
|
|
48
|
+
`);o.push(`${e} ${r}`,...s.map(i=>`${a.default.gray(h)} ${i}`))}process.stdout.write(`${o.join(`
|
|
37
49
|
`)}
|
|
38
|
-
`)},info:
|
|
39
|
-
`);let
|
|
40
|
-
`);process.stdout.write(
|
|
41
|
-
`);let
|
|
42
|
-
`),
|
|
43
|
-
${e.stack}`:e.message;if(Array.isArray(e))return`[${e.length} items]`;let o=Object.keys(e);return o.length===0?"{}":o.length<=3?JSON.stringify(e):`{${o.length} keys: ${o.slice(0,3).join(", ")}...}`}return String(e)}formatTool(e,o){if(!o)return e;let r=o;if(typeof o=="string")try{r=JSON.parse(o)}catch{r=o}if(e==="Bash"&&r.command)return`${e}(${r.command})`;if(r.file_path)return`${e}(${r.file_path})`;if(r.notebook_path)return`${e}(${r.notebook_path})`;if(e==="Glob"&&r.pattern)return`${e}(${r.pattern})`;if(e==="Grep"&&r.pattern)return`${e}(${r.pattern})`;if(r.url)return`${e}(${r.url})`;if(r.query)return`${e}(${r.query})`;if(e==="Task"){if(r.subagent_type)return`${e}(${r.subagent_type})`;if(r.description)return`${e}(${r.description})`}return e==="Skill"&&r.skill?`${e}(${r.skill})`:e==="LSP"&&r.operation?`${e}(${r.operation})`:e}formatTimestamp(e){let o=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0"),
|
|
44
|
-
${
|
|
45
|
-
${
|
|
46
|
-
`+JSON.stringify(
|
|
47
|
-
`,"utf8")}catch(
|
|
48
|
-
`)}else process.stderr.write(
|
|
49
|
-
`)}debug(e,o,r,s){this.log(0,e,o,r,s)}info(e,o,r,s){this.log(1,e,o,r,s)}warn(e,o,r,s){this.log(2,e,o,r,s)}error(e,o,r,s){this.log(3,e,o,r,s)}dataIn(e,o,r,s){this.info(e,`\u2192 ${o}`,r,s)}dataOut(e,o,r,s){this.info(e,`\u2190 ${o}`,r,s)}success(e,o,r,s){this.info(e,`\u2713 ${o}`,r,s)}failure(e,o,r,s){this.error(e,`\u2717 ${o}`,r,s)}timing(e,o,r,s){this.info(e,`\u23F1 ${o}`,s,{duration:`${r}ms`})}happyPathError(e,o,r,s,
|
|
50
|
-
`)[2]||"").match(/at\s+(?:.*\s+)?\(?([^:]+):(\d+):(\d+)\)?/),
|
|
51
|
-
`)}function
|
|
50
|
+
`)},info:t=>{b.message(t,{symbol:a.default.blue(xs)})},success:t=>{b.message(t,{symbol:a.default.green(vs)})},step:t=>{b.message(t,{symbol:a.default.green(dt)})},warn:t=>{b.message(t,{symbol:a.default.yellow(Ss)})},warning:t=>{b.warn(t)},error:t=>{b.message(t,{symbol:a.default.red(_s)})}},bs=()=>{let t=zt?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],e=zt?80:120,o=process.env.CI==="true",r,s,i=!1,n="",u,c=A=>{let L=A>1?"Something went wrong":"Canceled";i&&_e(L,A)},D=()=>c(2),d=()=>c(1),l=()=>{process.on("uncaughtExceptionMonitor",D),process.on("unhandledRejection",D),process.on("SIGINT",d),process.on("SIGTERM",d),process.on("exit",c)},y=()=>{process.removeListener("uncaughtExceptionMonitor",D),process.removeListener("unhandledRejection",D),process.removeListener("SIGINT",d),process.removeListener("SIGTERM",d),process.removeListener("exit",c)},v=()=>{if(u===void 0)return;o&&process.stdout.write(`
|
|
51
|
+
`);let A=u.split(`
|
|
52
|
+
`);process.stdout.write(Dt.cursor.move(-999,A.length-1)),process.stdout.write(Dt.erase.down(A.length))},de=A=>A.replace(/\.+$/,""),In=(A="")=>{i=!0,r=eo(),n=de(A),process.stdout.write(`${a.default.gray(h)}
|
|
53
|
+
`);let L=0,q=0;l(),s=setInterval(()=>{if(o&&n===u)return;v(),u=n;let _r=a.default.magenta(t[L]),br=o?"...":".".repeat(Math.floor(q)).slice(0,3);process.stdout.write(`${_r} ${n}${br}`),L=L+1<t.length?L+1:0,q=q<t.length?q+.125:0},e)},_e=(A="",L=0)=>{i=!1,clearInterval(s),v();let q=L===0?a.default.green(dt):L===1?a.default.red(uo):a.default.red(ao);n=de(A??n),process.stdout.write(`${q} ${n}
|
|
54
|
+
`),y(),r()};return{start:In,stop:_e,message:(A="")=>{n=de(A??n)}}},pt=async t=>{for(let e of t){if(e.enabled===!1)continue;let o=bs();o.start(e.title);let r=await e.task(o.message);o.stop(r||e.title)}}});import{execSync as As}from"child_process";import{existsSync as U,readdirSync as ws}from"fs";import{homedir as mo}from"os";import{join as G}from"path";function Be(t){try{return As(`${Y?"where":"which"} ${t}`,{stdio:"pipe"}),!0}catch{return!1}}function $s(t){let e=G(mo(),".vscode","extensions");if(!U(e))return!1;try{return ws(e).some(r=>r.toLowerCase().includes(t.toLowerCase()))}catch{return!1}}function Re(){let t=mo();return[{id:"claude-code",label:"Claude Code",detected:U(G(t,".claude")),supported:!0,hint:"recommended"},{id:"gemini-cli",label:"Gemini CLI",detected:U(G(t,".gemini")),supported:!0},{id:"opencode",label:"OpenCode",detected:U(G(t,".config","opencode"))||Be("opencode"),supported:!0,hint:"plugin-based integration"},{id:"openclaw",label:"OpenClaw",detected:U(G(t,".openclaw")),supported:!0,hint:"plugin-based integration"},{id:"windsurf",label:"Windsurf",detected:U(G(t,".codeium","windsurf")),supported:!0},{id:"codex-cli",label:"Codex CLI",detected:U(G(t,".codex")),supported:!0,hint:"transcript-based integration"},{id:"cursor",label:"Cursor",detected:U(G(t,".cursor")),supported:!1},{id:"copilot-cli",label:"Copilot CLI",detected:Be("copilot"),supported:!0,hint:"MCP-based integration"},{id:"antigravity",label:"Antigravity",detected:U(G(t,".gemini","antigravity")),supported:!0,hint:"MCP-based integration"},{id:"goose",label:"Goose",detected:U(G(t,".config","goose"))||Be("goose"),supported:!0,hint:"MCP-based integration"},{id:"crush",label:"Crush",detected:Be("crush"),supported:!0,hint:"MCP-based integration"},{id:"roo-code",label:"Roo Code",detected:$s("roo-code"),supported:!0,hint:"MCP-based integration"},{id:"warp",label:"Warp",detected:U(G(t,".warp"))||Be("warp"),supported:!0,hint:"MCP-based integration"}]}var po=p(()=>{"use strict";ie()});import{appendFileSync as ks,existsSync as go,mkdirSync as Ms,readFileSync as Is}from"fs";import{join as gt}from"path";import{homedir as Os}from"os";var Qt,fo,en,m,W=p(()=>{"use strict";Qt=(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))(Qt||{}),fo=gt(Os(),".claude-mem"),en=class{level=null;useColor;logFilePath=null;logFileInitialized=!1;constructor(){this.useColor=process.stdout.isTTY??!1}ensureLogFileInitialized(){if(!this.logFileInitialized){this.logFileInitialized=!0;try{let e=gt(fo,"logs");go(e)||Ms(e,{recursive:!0});let o=new Date().toISOString().split("T")[0];this.logFilePath=gt(e,`claude-mem-${o}.log`)}catch(e){console.error("[LOGGER] Failed to initialize log file:",e),this.logFilePath=null}}}getLevel(){if(this.level===null)try{let e=gt(fo,"settings.json");if(go(e)){let o=Is(e,"utf-8"),s=(JSON.parse(o).CLAUDE_MEM_LOG_LEVEL||"INFO").toUpperCase();this.level=Qt[s]??1}else this.level=1}catch{this.level=1}return this.level}correlationId(e,o){return`obs-${e}-${o}`}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}
|
|
55
|
+
${e.stack}`:e.message;if(Array.isArray(e))return`[${e.length} items]`;let o=Object.keys(e);return o.length===0?"{}":o.length<=3?JSON.stringify(e):`{${o.length} keys: ${o.slice(0,3).join(", ")}...}`}return String(e)}formatTool(e,o){if(!o)return e;let r=o;if(typeof o=="string")try{r=JSON.parse(o)}catch{r=o}if(e==="Bash"&&r.command)return`${e}(${r.command})`;if(r.file_path)return`${e}(${r.file_path})`;if(r.notebook_path)return`${e}(${r.notebook_path})`;if(e==="Glob"&&r.pattern)return`${e}(${r.pattern})`;if(e==="Grep"&&r.pattern)return`${e}(${r.pattern})`;if(r.url)return`${e}(${r.url})`;if(r.query)return`${e}(${r.query})`;if(e==="Task"){if(r.subagent_type)return`${e}(${r.subagent_type})`;if(r.description)return`${e}(${r.description})`}return e==="Skill"&&r.skill?`${e}(${r.skill})`:e==="LSP"&&r.operation?`${e}(${r.operation})`:e}formatTimestamp(e){let o=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0"),i=String(e.getHours()).padStart(2,"0"),n=String(e.getMinutes()).padStart(2,"0"),u=String(e.getSeconds()).padStart(2,"0"),c=String(e.getMilliseconds()).padStart(3,"0");return`${o}-${r}-${s} ${i}:${n}:${u}.${c}`}log(e,o,r,s,i){if(e<this.getLevel())return;this.ensureLogFileInitialized();let n=this.formatTimestamp(new Date),u=Qt[e].padEnd(5),c=o.padEnd(6),D="";s?.correlationId?D=`[${s.correlationId}] `:s?.sessionId&&(D=`[session-${s.sessionId}] `);let d="";i!=null&&(i instanceof Error?d=this.getLevel()===0?`
|
|
56
|
+
${i.message}
|
|
57
|
+
${i.stack}`:` ${i.message}`:this.getLevel()===0&&typeof i=="object"?d=`
|
|
58
|
+
`+JSON.stringify(i,null,2):d=" "+this.formatData(i));let l="";if(s){let{sessionId:v,memorySessionId:de,correlationId:In,..._e}=s;Object.keys(_e).length>0&&(l=` {${Object.entries(_e).map(([L,q])=>`${L}=${q}`).join(", ")}}`)}let y=`[${n}] [${u}] [${c}] ${D}${r}${l}${d}`;if(this.logFilePath)try{ks(this.logFilePath,y+`
|
|
59
|
+
`,"utf8")}catch(v){process.stderr.write(`[LOGGER] Failed to write to log file: ${v}
|
|
60
|
+
`)}else process.stderr.write(y+`
|
|
61
|
+
`)}debug(e,o,r,s){this.log(0,e,o,r,s)}info(e,o,r,s){this.log(1,e,o,r,s)}warn(e,o,r,s){this.log(2,e,o,r,s)}error(e,o,r,s){this.log(3,e,o,r,s)}dataIn(e,o,r,s){this.info(e,`\u2192 ${o}`,r,s)}dataOut(e,o,r,s){this.info(e,`\u2190 ${o}`,r,s)}success(e,o,r,s){this.info(e,`\u2713 ${o}`,r,s)}failure(e,o,r,s){this.error(e,`\u2717 ${o}`,r,s)}timing(e,o,r,s){this.info(e,`\u23F1 ${o}`,s,{duration:`${r}ms`})}happyPathError(e,o,r,s,i=""){let D=((new Error().stack||"").split(`
|
|
62
|
+
`)[2]||"").match(/at\s+(?:.*\s+)?\(?([^:]+):(\d+):(\d+)\)?/),d=D?`${D[1].split("/").pop()}:${D[2]}`:"unknown",l={...r,location:d};return this.warn(e,`[HAPPY-PATH] ${o}`,l,s),i}},m=new en});function Co(t){return process.platform==="win32"?Math.round(t*tn.WINDOWS_MULTIPLIER):t}var tn,ho=p(()=>{"use strict";tn={DEFAULT:3e5,HEALTH_CHECK:3e3,POST_SPAWN_WAIT:5e3,READINESS_WAIT:3e4,PORT_IN_USE_WAIT:3e3,WORKER_STARTUP_WAIT:1e3,PRE_RESTART_SETTLE_DELAY:2e3,POWERSHELL_COMMAND:1e4,WINDOWS_MULTIPLIER:1.5}});import{readFileSync as Ts,writeFileSync as Eo,existsSync as Fo,mkdirSync as Bs}from"fs";import{join as Rs,dirname as Ps}from"path";import{homedir as Ls}from"os";var Ce,nn=p(()=>{"use strict";Ce=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_PROVIDER:"claude",CLAUDE_MEM_CLAUDE_AUTH_METHOD:"cli",CLAUDE_MEM_GEMINI_API_KEY:"",CLAUDE_MEM_GEMINI_MODEL:"gemini-2.5-flash-lite",CLAUDE_MEM_GEMINI_RATE_LIMITING_ENABLED:"true",CLAUDE_MEM_OPENROUTER_API_KEY:"",CLAUDE_MEM_OPENROUTER_MODEL:"xiaomi/mimo-v2-flash:free",CLAUDE_MEM_OPENROUTER_SITE_URL:"",CLAUDE_MEM_OPENROUTER_APP_NAME:"claude-mem",CLAUDE_MEM_OPENROUTER_MAX_CONTEXT_MESSAGES:"20",CLAUDE_MEM_OPENROUTER_MAX_TOKENS:"100000",CLAUDE_MEM_DATA_DIR:Rs(Ls(),".claude-mem"),CLAUDE_MEM_LOG_LEVEL:"INFO",CLAUDE_MEM_PYTHON_VERSION:"3.13",CLAUDE_CODE_PATH:"",CLAUDE_MEM_MODE:"code",CLAUDE_MEM_CONTEXT_SHOW_READ_TOKENS:"false",CLAUDE_MEM_CONTEXT_SHOW_WORK_TOKENS:"false",CLAUDE_MEM_CONTEXT_SHOW_SAVINGS_AMOUNT:"false",CLAUDE_MEM_CONTEXT_SHOW_SAVINGS_PERCENT:"true",CLAUDE_MEM_CONTEXT_FULL_COUNT:"0",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",CLAUDE_MEM_CONTEXT_SHOW_TERMINAL_OUTPUT:"true",CLAUDE_MEM_FOLDER_CLAUDEMD_ENABLED:"false",CLAUDE_MEM_MAX_CONCURRENT_AGENTS:"2",CLAUDE_MEM_EXCLUDED_PROJECTS:"",CLAUDE_MEM_FOLDER_MD_EXCLUDE:"[]",CLAUDE_MEM_SEMANTIC_INJECT:"true",CLAUDE_MEM_SEMANTIC_INJECT_LIMIT:"5",CLAUDE_MEM_TIER_ROUTING_ENABLED:"true",CLAUDE_MEM_TIER_SIMPLE_MODEL:"haiku",CLAUDE_MEM_TIER_SUMMARY_MODEL:"",CLAUDE_MEM_CHROMA_ENABLED:"true",CLAUDE_MEM_CHROMA_MODE:"local",CLAUDE_MEM_CHROMA_HOST:"127.0.0.1",CLAUDE_MEM_CHROMA_PORT:"8000",CLAUDE_MEM_CHROMA_SSL:"false",CLAUDE_MEM_CHROMA_API_KEY:"",CLAUDE_MEM_CHROMA_TENANT:"default_tenant",CLAUDE_MEM_CHROMA_DATABASE:"default_database"};static getAllDefaults(){return{...this.DEFAULTS}}static get(e){return process.env[e]??this.DEFAULTS[e]}static getInt(e){let o=this.get(e);return parseInt(o,10)}static getBool(e){let o=this.get(e);return o==="true"||o===!0}static applyEnvOverrides(e){let o={...e};for(let r of Object.keys(this.DEFAULTS))process.env[r]!==void 0&&(o[r]=process.env[r]);return o}static loadFromFile(e){try{if(!Fo(e)){let n=this.getAllDefaults();try{let u=Ps(e);Fo(u)||Bs(u,{recursive:!0}),Eo(e,JSON.stringify(n,null,2),"utf-8"),console.log("[SETTINGS] Created settings file with defaults:",e)}catch(u){console.warn("[SETTINGS] Failed to create settings file, using in-memory defaults:",e,u)}return this.applyEnvOverrides(n)}let o=Ts(e,"utf-8"),r=JSON.parse(o),s=r;if(r.env&&typeof r.env=="object"){s=r.env;try{Eo(e,JSON.stringify(s,null,2),"utf-8"),console.log("[SETTINGS] Migrated settings file from nested to flat schema:",e)}catch(n){console.warn("[SETTINGS] Failed to auto-migrate settings file:",e,n)}}let i={...this.DEFAULTS};for(let n of Object.keys(this.DEFAULTS))s[n]!==void 0&&(i[n]=s[n]);return this.applyEnvOverrides(i)}catch(o){return console.warn("[SETTINGS] Failed to load settings, using defaults:",e,o),this.applyEnvOverrides(this.getAllDefaults())}}}});import{join as _,dirname as js,basename as ga}from"path";import{homedir as yo}from"os";import{existsSync as Ns,mkdirSync as Ea}from"fs";import{execSync as ya}from"child_process";import{fileURLToPath as Us}from"url";function Gs(){return typeof __dirname<"u"?__dirname:js(Us(import.meta.url))}function Ws(){if(process.env.CLAUDE_MEM_DATA_DIR)return process.env.CLAUDE_MEM_DATA_DIR;let t=_(yo(),".claude-mem"),e=_(t,"settings.json");try{if(Ns(e)){let{readFileSync:o}=Ir("fs"),r=JSON.parse(o(e,"utf-8")),s=r.env??r;if(s.CLAUDE_MEM_DATA_DIR)return s.CLAUDE_MEM_DATA_DIR}}catch{}return t}var Sa,O,Pe,ft,_a,ba,Aa,wa,$a,ka,Ma,Ia,Oa,Ta,Ba,Ra,Ct=p(()=>{"use strict";W();Sa=Gs();O=Ws(),Pe=process.env.CLAUDE_CONFIG_DIR||_(yo(),".claude"),ft=_(Pe,"plugins","marketplaces","thedotmack"),_a=_(O,"archives"),ba=_(O,"logs"),Aa=_(O,"trash"),wa=_(O,"backups"),$a=_(O,"modes"),ka=_(O,"settings.json"),Ma=_(O,"claude-mem.db"),Ia=_(O,"vector-db"),Oa=_(O,"observer-sessions"),Ta=_(Pe,"settings.json"),Ba=_(Pe,"commands"),Ra=_(Pe,"CLAUDE.md")});import Hs from"path";import{readFileSync as Na}from"fs";function Et(){if(ht!==null)return ht;let t=Hs.join(Ce.get("CLAUDE_MEM_DATA_DIR"),"settings.json"),e=Ce.loadFromFile(t);return ht=parseInt(e.CLAUDE_MEM_WORKER_PORT,10),ht}var Ja,ht,Le=p(()=>{"use strict";W();ho();nn();Ct();Ja=(()=>{let t=process.env.CLAUDE_MEM_HEALTH_TIMEOUT_MS;if(t){let e=parseInt(t,10);if(Number.isFinite(e)&&e>=500&&e<=3e5)return e;m.warn("SYSTEM","Invalid CLAUDE_MEM_HEALTH_TIMEOUT_MS, using default",{value:t,min:500,max:3e5})}return Co(tn.HEALTH_CHECK)})(),ht=null});import{existsSync as Xa,readFileSync as Ya,writeFileSync as qa,mkdirSync as za,renameSync as Za}from"fs";import{join as ec,basename as tc}from"path";var xo=p(()=>{"use strict";W()});import ee from"path";import{homedir as vo}from"os";import{existsSync as on,readFileSync as lc,writeFileSync as Dc,unlinkSync as dc,mkdirSync as mc}from"fs";import{exec as Ks}from"child_process";import{promisify as Vs}from"util";function rn(){let t=[ee.join(ft,"plugin","scripts","mcp-server.cjs"),ee.join(process.cwd(),"plugin","scripts","mcp-server.cjs")];for(let e of t)if(on(e))return e;return null}function Ft(){let t=[ee.join(ft,"plugin","scripts","worker-service.cjs"),ee.join(process.cwd(),"plugin","scripts","worker-service.cjs")];for(let e of t)if(on(e))return e;return null}function yt(){let t=[ee.join(vo(),".bun","bin","bun"),"/usr/local/bin/bun","/usr/bin/bun",...process.platform==="win32"?[ee.join(vo(),".bun","bin","bun.exe"),ee.join(process.env.LOCALAPPDATA||"","bun","bun.exe")]:[]];for(let e of t)if(e&&on(e))return e;return"bun"}var yc,xc,xt=p(()=>{"use strict";W();Le();Ct();xo();yc=Vs(Ks),xc=ee.join(O,"cursor-projects.json")});var cn={};X(cn,{checkGeminiCliHooksStatus:()=>wo,handleGeminiCliCommand:()=>ei,installGeminiCliHooks:()=>bo,uninstallGeminiCliHooks:()=>Ao});import sn from"path";import{homedir as Xs}from"os";import{existsSync as Ee,readFileSync as vt,writeFileSync as un,mkdirSync as So}from"fs";function qs(t,e,o){let r=he[o];if(!r)throw new Error(`Unknown Gemini CLI event: ${o}`);let s=t.replace(/\\/g,"\\\\"),i=e.replace(/\\/g,"\\\\");return`"${s}" "${i}" hook gemini-cli ${r}`}function zs(t){return{matcher:"*",hooks:[{name:je,type:"command",command:t,timeout:Ys}]}}function an(){if(!Ee(J))return{};let t=vt(J,"utf-8");try{return JSON.parse(t)}catch{throw new Error(`Corrupt JSON in ${J}, refusing to overwrite user settings`)}}function _o(t){So(St,{recursive:!0}),un(J,JSON.stringify(t,null,2)+`
|
|
63
|
+
`)}function Zs(t,e){let o={...t};o.hooks||(o.hooks={});for(let[r,s]of Object.entries(e)){let i=o.hooks[r]??[];for(let n of s){let u=i.findIndex(c=>c.hooks.some(D=>D.name===je));if(u>=0){let c=i[u],D=c.hooks.findIndex(d=>d.name===je);D>=0?c.hooks[D]=n.hooks[0]:c.hooks.push(n.hooks[0])}else i.push(n)}o.hooks[r]=i}return o}function Qs(){let t="<claude-mem-context>",o=`${t}
|
|
52
64
|
# Memory Context from Past Sessions
|
|
53
65
|
|
|
54
66
|
*No context yet. Complete your first session and context will appear here.*
|
|
55
|
-
</claude-mem-context>`,r="";if(
|
|
67
|
+
</claude-mem-context>`,r="";if(Ee(H)&&(r=vt(H,"utf-8")),r.includes(t))return;let s=r.length>0&&!r.endsWith(`
|
|
56
68
|
`)?`
|
|
57
69
|
|
|
58
70
|
`:r.length>0?`
|
|
59
|
-
`:"",
|
|
60
|
-
`;
|
|
71
|
+
`:"",i=r+s+o+`
|
|
72
|
+
`;So(St,{recursive:!0}),un(H,i)}async function bo(){console.log(`
|
|
61
73
|
Installing Claude-Mem Gemini CLI hooks...
|
|
62
|
-
`);let
|
|
74
|
+
`);let t=Ft();if(!t)return console.error("Could not find worker-service.cjs"),console.error(" Expected at: ~/.claude/plugins/marketplaces/thedotmack/plugin/scripts/worker-service.cjs"),1;let e=yt();console.log(` Using Bun runtime: ${e}`),console.log(` Worker service: ${t}`);try{let o={};for(let n of Object.keys(he)){let u=qs(e,t,n);o[n]=[zs(u)]}let r=an(),s=Zs(r,o);_o(s),console.log(` Merged hooks into ${J}`),Qs(),console.log(` Setup context injection in ${H}`);let i=Object.keys(he);console.log(` Registered ${i.length} hook events:`);for(let n of i){let u=he[n];console.log(` ${n} \u2192 ${u}`)}return console.log(`
|
|
63
75
|
Installation complete!
|
|
64
76
|
|
|
65
|
-
Hooks installed to: ${
|
|
77
|
+
Hooks installed to: ${J}
|
|
66
78
|
Using unified CLI: bun worker-service.cjs hook gemini-cli <event>
|
|
67
79
|
|
|
68
80
|
Next steps:
|
|
@@ -74,21 +86,21 @@ Context Injection:
|
|
|
74
86
|
Context from past sessions is injected via ~/.gemini/GEMINI.md
|
|
75
87
|
and automatically included in Gemini CLI conversations.
|
|
76
88
|
`),0}catch(o){return console.error(`
|
|
77
|
-
Installation failed: ${o.message}`),1}}function
|
|
89
|
+
Installation failed: ${o.message}`),1}}function Ao(){console.log(`
|
|
78
90
|
Uninstalling Claude-Mem Gemini CLI hooks...
|
|
79
|
-
`);try{if(!
|
|
91
|
+
`);try{if(!Ee(J))return console.log(" No Gemini CLI settings found \u2014 nothing to uninstall."),0;let t=an();if(!t.hooks)return console.log(" No hooks found in Gemini CLI settings \u2014 nothing to uninstall."),0;let e=0;for(let[o,r]of Object.entries(t.hooks)){let s=r.map(i=>{let n=i.hooks.filter(u=>u.name!==je);return e+=i.hooks.length-n.length,{...i,hooks:n}}).filter(i=>i.hooks.length>0);s.length>0?t.hooks[o]=s:delete t.hooks[o]}if(Object.keys(t.hooks).length===0&&delete t.hooks,_o(t),console.log(` Removed ${e} claude-mem hook(s) from ${J}`),Ee(H)){let o=vt(H,"utf-8"),r=/\n?<claude-mem-context>[\s\S]*?<\/claude-mem-context>\n?/;r.test(o)&&(o=o.replace(r,""),un(H,o),console.log(` Removed context section from ${H}`))}return console.log(`
|
|
80
92
|
Uninstallation complete!
|
|
81
|
-
`),console.log("Restart Gemini CLI to apply changes."),0}catch(
|
|
82
|
-
Uninstallation failed: ${
|
|
93
|
+
`),console.log("Restart Gemini CLI to apply changes."),0}catch(t){return console.error(`
|
|
94
|
+
Uninstallation failed: ${t.message}`),1}}function wo(){if(console.log(`
|
|
83
95
|
Claude-Mem Gemini CLI Hooks Status
|
|
84
|
-
`),!
|
|
96
|
+
`),!Ee(J))return console.log("Gemini CLI settings: Not found"),console.log(` Expected at: ${J}
|
|
85
97
|
`),console.log(`No hooks installed. Run: claude-mem install --ide gemini-cli
|
|
86
|
-
`),0;let
|
|
87
|
-
`),0}if(!
|
|
98
|
+
`),0;let t;try{t=an()}catch(o){return console.log(`Gemini CLI settings: ${o.message}
|
|
99
|
+
`),0}if(!t.hooks)return console.log(`Gemini CLI settings: Found, but no hooks configured
|
|
88
100
|
`),console.log(`No hooks installed. Run: claude-mem install --ide gemini-cli
|
|
89
|
-
`),0;let e=[];for(let[o,r]of Object.entries(
|
|
101
|
+
`),0;let e=[];for(let[o,r]of Object.entries(t.hooks))r.some(i=>i.hooks.some(n=>n.name===je))&&e.push(o);if(e.length===0)return console.log(`Gemini CLI settings: Found, but no claude-mem hooks
|
|
90
102
|
`),console.log(`Run: claude-mem install --ide gemini-cli
|
|
91
|
-
`),0;console.log(`Settings: ${
|
|
103
|
+
`),0;console.log(`Settings: ${J}`),console.log("Mode: Unified CLI (bun worker-service.cjs hook gemini-cli)"),console.log(`Events: ${e.length} of ${Object.keys(he).length} mapped`);for(let o of e){let r=he[o]??"unknown";console.log(` ${o} \u2192 ${r}`)}return Ee(H)?vt(H,"utf-8").includes("<claude-mem-context>")?console.log(`Context: Active (${H})`):console.log("Context: GEMINI.md exists but missing claude-mem section"):console.log("Context: No GEMINI.md found"),console.log(""),0}async function ei(t,e){switch(t){case"install":return bo();case"uninstall":return Ao();case"status":return wo();default:return console.log(`
|
|
92
104
|
Claude-Mem Gemini CLI Integration
|
|
93
105
|
|
|
94
106
|
Usage: claude-mem gemini-cli <command>
|
|
@@ -104,7 +116,36 @@ Examples:
|
|
|
104
116
|
claude-mem gemini-cli uninstall # Remove hooks
|
|
105
117
|
|
|
106
118
|
For more info: https://docs.claude-mem.ai/usage/gemini-provider
|
|
107
|
-
`),0}}var
|
|
119
|
+
`),0}}var St,J,H,je,Ys,he,ln=p(()=>{"use strict";xt();St=sn.join(Xs(),".gemini"),J=sn.join(St,"settings.json"),H=sn.join(St,"GEMINI.md"),je="claude-mem",Ys=1e4,he={SessionStart:"context",BeforeAgent:"user-message",AfterAgent:"observation",BeforeTool:"observation",AfterTool:"observation",PreCompress:"summarize",Notification:"observation",SessionEnd:"session-complete"}});import ti from"path";import{existsSync as ni,readFileSync as oi,writeFileSync as Dn,mkdirSync as ri}from"fs";function _t(t,e,o){let r=ti.dirname(t);ri(r,{recursive:!0});let s=`${Ne}
|
|
120
|
+
${e}
|
|
121
|
+
${Fe}`;if(ni(t)){let i=oi(t,"utf-8"),n=i.indexOf(Ne),u=i.indexOf(Fe);n!==-1&&u!==-1?i=i.slice(0,n)+s+i.slice(u+Fe.length):i=i.trimEnd()+`
|
|
122
|
+
|
|
123
|
+
`+s+`
|
|
124
|
+
`,Dn(t,i,"utf-8")}else o?Dn(t,`${o}
|
|
125
|
+
|
|
126
|
+
${s}
|
|
127
|
+
`,"utf-8"):Dn(t,s+`
|
|
128
|
+
`,"utf-8")}var Ne,Fe,dn=p(()=>{"use strict";Ne="<claude-mem-context>",Fe="</claude-mem-context>"});var pn={};X(pn,{checkOpenCodeStatus:()=>Di,findBuiltPluginPath:()=>Io,getInstalledPluginPath:()=>Ge,getOpenCodeAgentsMdPath:()=>Ue,getOpenCodeConfigDirectory:()=>bt,getOpenCodePluginsDirectory:()=>mn,injectContextIntoAgentsMd:()=>ae,installOpenCodeIntegration:()=>di,installOpenCodePlugin:()=>Oo,syncContextToAgentsMd:()=>ci,uninstallOpenCodePlugin:()=>li});import te from"path";import{homedir as ko}from"os";import{fileURLToPath as si}from"url";import{existsSync as ye,readFileSync as Mo,writeFileSync as ii,mkdirSync as ui,copyFileSync as ai,unlinkSync as $o}from"fs";function bt(){return process.env.OPENCODE_CONFIG_DIR?process.env.OPENCODE_CONFIG_DIR:te.join(ko(),".config","opencode")}function mn(){return te.join(bt(),"plugins")}function Ue(){return te.join(bt(),"AGENTS.md")}function Ge(){return te.join(mn(),"claude-mem.js")}function Io(){let t=[te.join(process.env.CLAUDE_CONFIG_DIR||te.join(ko(),".claude"),"plugins","marketplaces","thedotmack","dist","opencode-plugin","index.js"),te.join(te.dirname(si(import.meta.url)),"..","..","..","dist","opencode-plugin","index.js")];for(let e of t)if(ye(e))return e;return null}function Oo(){let t=Io();if(!t)return console.error("Could not find built OpenCode plugin bundle."),console.error(" Expected at: dist/opencode-plugin/index.js"),console.error(" Run the build first: npm run build"),1;let e=mn(),o=Ge();try{return ui(e,{recursive:!0}),ai(t,o),console.log(` Plugin installed to: ${o}`),m.info("OPENCODE","Plugin installed",{destination:o}),0}catch(r){let s=r instanceof Error?r.message:String(r);return console.error(`Failed to install OpenCode plugin: ${s}`),1}}function ae(t){let e=Ue();try{return _t(e,t,"# Claude-Mem Memory Context"),m.info("OPENCODE","Context injected into AGENTS.md",{path:e}),0}catch(o){let r=o instanceof Error?o.message:String(o);return console.error(`Failed to inject context into AGENTS.md: ${r}`),1}}async function ci(t,e){try{let o=await fetch(`http://127.0.0.1:${t}/api/context/inject?project=${encodeURIComponent(e)}`);if(!o.ok)return;let r=await o.text();r&&r.trim()&&ae(r)!==0&&m.warn("OPENCODE","Failed to inject context into AGENTS.md during sync")}catch{}}function li(){let t=!1,e=Ge();if(ye(e))try{$o(e),console.log(` Removed plugin: ${e}`)}catch(r){let s=r instanceof Error?r.message:String(r);console.error(` Failed to remove plugin: ${s}`),t=!0}let o=Ue();if(ye(o))try{let r=Mo(o,"utf-8"),s=r.indexOf(Ne),i=r.indexOf(Fe);if(s!==-1&&i!==-1){r=r.slice(0,s).trimEnd()+`
|
|
129
|
+
`+r.slice(i+Fe.length).trimStart();let n=r.trim();n.length===0||n==="# Claude-Mem Memory Context"?($o(o),console.log(" Removed empty AGENTS.md")):(ii(o,n+`
|
|
130
|
+
`,"utf-8"),console.log(" Cleaned context from AGENTS.md"))}}catch(r){let s=r instanceof Error?r.message:String(r);console.error(` Failed to clean AGENTS.md: ${s}`),t=!0}return t?1:0}function Di(){console.log(`
|
|
131
|
+
Claude-Mem OpenCode Integration Status
|
|
132
|
+
`);let t=bt(),e=Ge(),o=Ue();if(console.log(`Config directory: ${t}`),console.log(` Exists: ${ye(t)?"yes":"no"}`),console.log(""),console.log(`Plugin: ${e}`),console.log(` Installed: ${ye(e)?"yes":"no"}`),console.log(""),console.log(`Context (AGENTS.md): ${o}`),ye(o)){let s=Mo(o,"utf-8").includes(Ne);console.log(" Exists: yes"),console.log(` Has claude-mem context: ${s?"yes":"no"}`)}else console.log(" Exists: no");return console.log(""),0}async function di(){console.log(`
|
|
133
|
+
Installing Claude-Mem for OpenCode...
|
|
134
|
+
`);let t=Oo();if(t!==0)return t;let e=`# Memory Context from Past Sessions
|
|
135
|
+
|
|
136
|
+
*No context yet. Complete your first session and context will appear here.*
|
|
137
|
+
|
|
138
|
+
Use claude-mem search tools for manual memory queries.`;try{let o=Et();if((await fetch(`http://127.0.0.1:${o}/api/readiness`)).ok){let s=await fetch(`http://127.0.0.1:${o}/api/context/inject?project=opencode`);if(s.ok){let i=await s.text();i&&i.trim()?ae(i)!==0?m.warn("OPENCODE","Failed to inject real context into AGENTS.md during install"):console.log(" Context injected from existing memory"):ae(e)!==0?m.warn("OPENCODE","Failed to inject placeholder context into AGENTS.md during install"):console.log(" Placeholder context created (will populate after first session)")}else ae(e)!==0&&m.warn("OPENCODE","Failed to inject placeholder context into AGENTS.md during install")}else ae(e)!==0?m.warn("OPENCODE","Failed to inject placeholder context into AGENTS.md during install"):console.log(" Placeholder context created (worker not running)")}catch{ae(e)!==0?m.warn("OPENCODE","Failed to inject placeholder context into AGENTS.md during install"):console.log(" Placeholder context created (worker not running)")}return console.log(`
|
|
139
|
+
Installation complete!
|
|
140
|
+
|
|
141
|
+
Plugin installed to: ${Ge()}
|
|
142
|
+
Context file: ${Ue()}
|
|
143
|
+
|
|
144
|
+
Next steps:
|
|
145
|
+
1. Start claude-mem worker: npx claude-mem start
|
|
146
|
+
2. Restart OpenCode to load the plugin
|
|
147
|
+
3. Memory capture is automatic from then on
|
|
148
|
+
`),0}var gn=p(()=>{"use strict";W();dn();Le()});var hn={};X(hn,{checkWindsurfHooksStatus:()=>Uo,handleWindsurfCommand:()=>Ei,installWindsurfHooks:()=>jo,readWindsurfRegistry:()=>kt,registerWindsurfProject:()=>Po,uninstallWindsurfHooks:()=>No,unregisterWindsurfProject:()=>Lo,updateWindsurfContextForProject:()=>gi,writeWindsurfContextFile:()=>Cn,writeWindsurfRegistry:()=>fn});import R from"path";import{homedir as mi}from"os";import{existsSync as xe,readFileSync as wt,writeFileSync as He,unlinkSync as To,mkdirSync as $t,renameSync as pi}from"fs";function kt(){try{return xe(We)?JSON.parse(wt(We,"utf-8")):{}}catch(t){return m.error("WINDSURF","Failed to read registry, using empty",{file:We},t),{}}}function fn(t){let e=R.dirname(We);$t(e,{recursive:!0}),He(We,JSON.stringify(t,null,2))}function Po(t){let e=kt();e[t]={installedAt:new Date().toISOString()},fn(e),m.info("WINDSURF","Registered project for auto-context updates",{workspacePath:t})}function Lo(t){let e=kt();e[t]&&(delete e[t],fn(e),m.info("WINDSURF","Unregistered project",{workspacePath:t}))}async function gi(t,e,o){if(kt()[e])try{let i=await fetch(`http://127.0.0.1:${o}/api/context/inject?project=${encodeURIComponent(t)}`);if(!i.ok)return;let n=await i.text();if(!n||!n.trim())return;Cn(e,n),m.debug("WINDSURF","Updated context file",{projectName:t,workspacePath:e})}catch(i){m.error("WINDSURF","Failed to update context file",{projectName:t,workspacePath:e},i)}}function Cn(t,e){let o=R.join(t,".windsurf","rules"),r=R.join(o,"claude-mem-context.md"),s=`${r}.tmp`;$t(o,{recursive:!0});let i=`# Memory Context from Past Sessions
|
|
108
149
|
|
|
109
150
|
The following context is from claude-mem, a persistent memory system that tracks your coding sessions.
|
|
110
151
|
|
|
@@ -112,15 +153,15 @@ ${e}
|
|
|
112
153
|
|
|
113
154
|
---
|
|
114
155
|
*Auto-updated by claude-mem after each session. Use MCP search tools for detailed queries.*
|
|
115
|
-
`;
|
|
156
|
+
`;i.length>Bo&&(i=i.slice(0,Bo-50)+`
|
|
116
157
|
|
|
117
158
|
*[Truncated \u2014 use MCP search for full history]*
|
|
118
|
-
`),
|
|
159
|
+
`),He(s,i),pi(s,r)}function fi(t,e,o){let s={pre_user_prompt:"session-init",post_write_code:"file-edit",post_run_command:"observation",post_mcp_tool_use:"observation",post_cascade_response:"observation"}[o]??"observation";return`"${t}" "${e}" hook windsurf ${s}`}function Ci(t,e,o){$t(Ro,{recursive:!0});let r={hooks:{}};if(xe(B))try{r=JSON.parse(wt(B,"utf-8")),r.hooks||(r.hooks={})}catch{throw new Error(`Corrupt hooks.json at ${B}, refusing to overwrite`)}for(let s of At){let n={command:fi(t,e,s),show_output:!1,working_directory:o},u=(r.hooks[s]??[]).filter(c=>!c.command.includes("worker-service")||!c.command.includes("windsurf"));r.hooks[s]=[...u,n]}He(B,JSON.stringify(r,null,2))}async function jo(){console.log(`
|
|
119
160
|
Installing Claude-Mem Windsurf hooks (user level)...
|
|
120
|
-
`);let
|
|
161
|
+
`);let t=Ft();if(!t)return console.error("Could not find worker-service.cjs"),console.error(" Expected at: ~/.claude/plugins/marketplaces/thedotmack/plugin/scripts/worker-service.cjs"),1;let e=yt();if(!e)return console.error("Could not find Bun runtime"),console.error(" Install Bun: curl -fsSL https://bun.sh/install | bash"),1;let o=R.dirname(t);try{console.log(` Using Bun runtime: ${e}`),console.log(` Worker service: ${t}`),Ci(e,t,o),console.log(" Created/merged hooks.json");let r=process.cwd();return await hi(r),console.log(`
|
|
121
162
|
Installation complete!
|
|
122
163
|
|
|
123
|
-
Hooks installed to: ${
|
|
164
|
+
Hooks installed to: ${B}
|
|
124
165
|
Using unified CLI: bun worker-service.cjs hook windsurf <command>
|
|
125
166
|
|
|
126
167
|
Events registered:
|
|
@@ -135,21 +176,21 @@ Next steps:
|
|
|
135
176
|
2. Restart Windsurf to load the hooks
|
|
136
177
|
3. Context is injected via .windsurf/rules/claude-mem-context.md (workspace-level)
|
|
137
178
|
`),0}catch(r){return console.error(`
|
|
138
|
-
Installation failed: ${r.message}`),1}}async function
|
|
179
|
+
Installation failed: ${r.message}`),1}}async function hi(t){let e=Et(),o=R.basename(t),r=!1;console.log(" Generating initial context...");try{if((await fetch(`http://127.0.0.1:${e}/api/readiness`)).ok){let i=await fetch(`http://127.0.0.1:${e}/api/context/inject?project=${encodeURIComponent(o)}`);if(i.ok){let n=await i.text();n&&n.trim()&&(Cn(t,n),r=!0,console.log(" Generated initial context from existing memory"))}}}catch(s){m.debug("WINDSURF","Worker not running during install",{},s)}if(!r){let s=R.join(t,".windsurf","rules");$t(s,{recursive:!0});let i=R.join(s,"claude-mem-context.md");He(i,`# Memory Context from Past Sessions
|
|
139
180
|
|
|
140
181
|
*No context yet. Complete your first session and context will appear here.*
|
|
141
182
|
|
|
142
183
|
Use claude-mem's MCP search tools for manual memory queries.
|
|
143
|
-
`),console.log(" Created placeholder context file (will populate after first session)")}
|
|
184
|
+
`),console.log(" Created placeholder context file (will populate after first session)")}Po(t),console.log(" Registered for auto-context updates")}function No(){console.log(`
|
|
144
185
|
Uninstalling Claude-Mem Windsurf hooks...
|
|
145
|
-
`);try{if(
|
|
186
|
+
`);try{if(xe(B))try{let o=JSON.parse(wt(B,"utf-8"));for(let r of At)o.hooks[r]&&(o.hooks[r]=o.hooks[r].filter(s=>!s.command.includes("worker-service")||!s.command.includes("windsurf")),o.hooks[r].length===0&&delete o.hooks[r]);Object.keys(o.hooks).length===0?(To(B),console.log(" Removed hooks.json (no hooks remaining)")):(He(B,JSON.stringify(o,null,2)),console.log(" Removed claude-mem entries from hooks.json (other hooks preserved)"))}catch{console.log(" Warning: could not parse hooks.json \u2014 leaving file intact to preserve other hooks")}else console.log(" No hooks.json found");let t=process.cwd(),e=R.join(t,".windsurf","rules","claude-mem-context.md");return xe(e)&&(To(e),console.log(" Removed context file")),Lo(t),console.log(" Unregistered from auto-context updates"),console.log(`
|
|
146
187
|
Uninstallation complete!
|
|
147
|
-
`),console.log("Restart Windsurf to apply changes."),0}catch(
|
|
148
|
-
Uninstallation failed: ${
|
|
188
|
+
`),console.log("Restart Windsurf to apply changes."),0}catch(t){return console.error(`
|
|
189
|
+
Uninstallation failed: ${t.message}`),1}}function Uo(){if(console.log(`
|
|
149
190
|
Claude-Mem Windsurf Hooks Status
|
|
150
|
-
`),
|
|
191
|
+
`),xe(B)){console.log("User-level: Installed"),console.log(` Config: ${B}`);try{let e=JSON.parse(wt(B,"utf-8")),o=At.filter(r=>e.hooks[r]?.some(s=>s.command.includes("worker-service")&&s.command.includes("windsurf")));console.log(` Events: ${o.length}/${At.length} registered`);for(let r of o)console.log(` - ${r}`)}catch{console.log(" Mode: Unable to parse hooks.json")}let t=R.join(process.cwd(),".windsurf","rules","claude-mem-context.md");xe(t)?console.log(" Context: Active (current workspace)"):console.log(" Context: Not yet generated for this workspace")}else console.log("User-level: Not installed"),console.log(`
|
|
151
192
|
No hooks installed. Run: claude-mem windsurf install
|
|
152
|
-
`);return console.log(""),0}async function
|
|
193
|
+
`);return console.log(""),0}async function Ei(t,e){switch(t){case"install":return jo();case"uninstall":return No();case"status":return Uo();default:return console.log(`
|
|
153
194
|
Claude-Mem Windsurf Integration
|
|
154
195
|
|
|
155
196
|
Usage: claude-mem windsurf <command>
|
|
@@ -165,114 +206,124 @@ Examples:
|
|
|
165
206
|
claude-mem windsurf status # Check if hooks are installed
|
|
166
207
|
|
|
167
208
|
For more info: https://docs.claude-mem.ai/windsurf
|
|
168
|
-
`),0}}var
|
|
169
|
-
${e}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
`+s+`
|
|
173
|
-
`,Nt(n,u,"utf-8")}else o?Nt(n,`${o}
|
|
174
|
-
|
|
175
|
-
${s}
|
|
176
|
-
`,"utf-8"):Nt(n,s+`
|
|
177
|
-
`,"utf-8")}var he,re,oo=p(()=>{"use strict";he="<claude-mem-context>",re="</claude-mem-context>"});var co={};G(co,{checkOpenCodeStatus:()=>Rs,findBuiltPluginPath:()=>io,getInstalledPluginPath:()=>Fe,getOpenCodeAgentsMdPath:()=>Ee,getOpenCodeConfigDirectory:()=>ot,getOpenCodePluginsDirectory:()=>Ut,injectContextIntoAgentsMd:()=>K,installOpenCodeIntegration:()=>Ls,installOpenCodePlugin:()=>ao,syncContextToAgentsMd:()=>Ts,uninstallOpenCodePlugin:()=>Is});import J from"path";import{homedir as so}from"os";import{fileURLToPath as ks}from"url";import{existsSync as se,readFileSync as uo,writeFileSync as Ms,mkdirSync as Os,copyFileSync as Bs,unlinkSync as ro}from"fs";function ot(){return process.env.OPENCODE_CONFIG_DIR?process.env.OPENCODE_CONFIG_DIR:J.join(so(),".config","opencode")}function Ut(){return J.join(ot(),"plugins")}function Ee(){return J.join(ot(),"AGENTS.md")}function Fe(){return J.join(Ut(),"claude-mem.js")}function io(){let n=[J.join(process.env.CLAUDE_CONFIG_DIR||J.join(so(),".claude"),"plugins","marketplaces","thedotmack","dist","opencode-plugin","index.js"),J.join(J.dirname(ks(import.meta.url)),"..","..","..","dist","opencode-plugin","index.js")];for(let e of n)if(se(e))return e;return null}function ao(){let n=io();if(!n)return console.error("Could not find built OpenCode plugin bundle."),console.error(" Expected at: dist/opencode-plugin/index.js"),console.error(" Run the build first: npm run build"),1;let e=Ut(),o=Fe();try{return Os(e,{recursive:!0}),Bs(n,o),console.log(` Plugin installed to: ${o}`),l.info("OPENCODE","Plugin installed",{destination:o}),0}catch(r){let s=r instanceof Error?r.message:String(r);return console.error(`Failed to install OpenCode plugin: ${s}`),1}}function K(n){let e=Ee();try{return no(e,n,"# Claude-Mem Memory Context"),l.info("OPENCODE","Context injected into AGENTS.md",{path:e}),0}catch(o){let r=o instanceof Error?o.message:String(o);return console.error(`Failed to inject context into AGENTS.md: ${r}`),1}}async function Ts(n,e){try{let o=await fetch(`http://127.0.0.1:${n}/api/context/inject?project=${encodeURIComponent(e)}`);if(!o.ok)return;let r=await o.text();r&&r.trim()&&K(r)!==0&&l.warn("OPENCODE","Failed to inject context into AGENTS.md during sync")}catch{}}function Is(){let n=!1,e=Fe();if(se(e))try{ro(e),console.log(` Removed plugin: ${e}`)}catch(r){let s=r instanceof Error?r.message:String(r);console.error(` Failed to remove plugin: ${s}`),n=!0}let o=Ee();if(se(o))try{let r=uo(o,"utf-8"),s=r.indexOf(he),u=r.indexOf(re);if(s!==-1&&u!==-1){r=r.slice(0,s).trimEnd()+`
|
|
178
|
-
`+r.slice(u+re.length).trimStart();let t=r.trim();t.length===0||t==="# Claude-Mem Memory Context"?(ro(o),console.log(" Removed empty AGENTS.md")):(Ms(o,t+`
|
|
179
|
-
`,"utf-8"),console.log(" Cleaned context from AGENTS.md"))}}catch(r){let s=r instanceof Error?r.message:String(r);console.error(` Failed to clean AGENTS.md: ${s}`),n=!0}return n?1:0}function Rs(){console.log(`
|
|
180
|
-
Claude-Mem OpenCode Integration Status
|
|
181
|
-
`);let n=ot(),e=Fe(),o=Ee();if(console.log(`Config directory: ${n}`),console.log(` Exists: ${se(n)?"yes":"no"}`),console.log(""),console.log(`Plugin: ${e}`),console.log(` Installed: ${se(e)?"yes":"no"}`),console.log(""),console.log(`Context (AGENTS.md): ${o}`),se(o)){let s=uo(o,"utf-8").includes(he);console.log(" Exists: yes"),console.log(` Has claude-mem context: ${s?"yes":"no"}`)}else console.log(" Exists: no");return console.log(""),0}async function Ls(){console.log(`
|
|
182
|
-
Installing Claude-Mem for OpenCode...
|
|
183
|
-
`);let n=ao();if(n!==0)return n;let e=`# Memory Context from Past Sessions
|
|
184
|
-
|
|
185
|
-
*No context yet. Complete your first session and context will appear here.*
|
|
186
|
-
|
|
187
|
-
Use claude-mem search tools for manual memory queries.`;try{let o=Ke();if((await fetch(`http://127.0.0.1:${o}/api/readiness`)).ok){let s=await fetch(`http://127.0.0.1:${o}/api/context/inject?project=opencode`);if(s.ok){let u=await s.text();u&&u.trim()?K(u)!==0?l.warn("OPENCODE","Failed to inject real context into AGENTS.md during install"):console.log(" Context injected from existing memory"):K(e)!==0?l.warn("OPENCODE","Failed to inject placeholder context into AGENTS.md during install"):console.log(" Placeholder context created (will populate after first session)")}else K(e)!==0&&l.warn("OPENCODE","Failed to inject placeholder context into AGENTS.md during install")}else K(e)!==0?l.warn("OPENCODE","Failed to inject placeholder context into AGENTS.md during install"):console.log(" Placeholder context created (worker not running)")}catch{K(e)!==0?l.warn("OPENCODE","Failed to inject placeholder context into AGENTS.md during install"):console.log(" Placeholder context created (worker not running)")}return console.log(`
|
|
188
|
-
Installation complete!
|
|
189
|
-
|
|
190
|
-
Plugin installed to: ${Fe()}
|
|
191
|
-
Context file: ${Ee()}
|
|
192
|
-
|
|
193
|
-
Next steps:
|
|
194
|
-
1. Start claude-mem worker: npx claude-mem start
|
|
195
|
-
2. Restart OpenCode to load the plugin
|
|
196
|
-
3. Memory capture is automatic from then on
|
|
197
|
-
`),0}var Do=p(()=>{"use strict";T();oo();pe()});var Fo={};G(Fo,{checkOpenClawStatus:()=>Ws,findPluginManifestPath:()=>Co,findPluginSkillsDirectory:()=>fo,findPreBuiltPluginDirectory:()=>go,getOpenClawClaudeMemExtensionDirectory:()=>xe,getOpenClawConfigDirectory:()=>ye,getOpenClawConfigFilePath:()=>ue,getOpenClawExtensionsDirectory:()=>po,installOpenClawIntegration:()=>Hs,installOpenClawPlugin:()=>Eo,uninstallOpenClawPlugin:()=>Gs});import h from"path";import{homedir as rt}from"os";import{existsSync as j,readFileSync as Ps,writeFileSync as lo,mkdirSync as mo,cpSync as Gt,rmSync as js}from"fs";function ye(){return h.join(rt(),".openclaw")}function po(){return h.join(ye(),"extensions")}function xe(){return h.join(po(),"claude-mem")}function ue(){return h.join(ye(),"openclaw.json")}function go(){let n=[h.join(process.env.CLAUDE_CONFIG_DIR||h.join(rt(),".claude"),"plugins","marketplaces","thedotmack"),process.cwd()];for(let e of n){let o=h.join(e,"openclaw","dist"),r=h.join(o,"index.js");if(j(r))return o}return null}function Co(){let n=[h.join(process.env.CLAUDE_CONFIG_DIR||h.join(rt(),".claude"),"plugins","marketplaces","thedotmack"),process.cwd()];for(let e of n){let o=h.join(e,"openclaw","openclaw.plugin.json");if(j(o))return o}return null}function fo(){let n=[h.join(process.env.CLAUDE_CONFIG_DIR||h.join(rt(),".claude"),"plugins","marketplaces","thedotmack"),process.cwd()];for(let e of n){let o=h.join(e,"openclaw","skills");if(j(o))return o}return null}function Wt(){let n=ue();if(!j(n))return{};try{return JSON.parse(Ps(n,"utf-8"))}catch{return{}}}function ho(n){let e=ye();mo(e,{recursive:!0}),lo(ue(),JSON.stringify(n,null,2)+`
|
|
198
|
-
`,"utf-8")}function Ns(n=37777,e="openclaw",o=!0){let r=Wt();if(r.plugins||(r.plugins={}),r.plugins.slots||(r.plugins.slots={}),r.plugins.entries||(r.plugins.entries={}),r.plugins.slots.memory="claude-mem",!r.plugins.entries["claude-mem"])r.plugins.entries["claude-mem"]={enabled:!0,config:{workerPort:n,project:e,syncMemoryFile:o}};else{r.plugins.entries["claude-mem"].enabled=!0,r.plugins.entries["claude-mem"].config||(r.plugins.entries["claude-mem"].config={});let s=r.plugins.entries["claude-mem"].config;s.workerPort===void 0&&(s.workerPort=n),s.project===void 0&&(s.project=e),s.syncMemoryFile===void 0&&(s.syncMemoryFile=o)}ho(r)}function Us(){let n=ue();if(!j(n))return;let e=Wt();e.plugins?.entries?.["claude-mem"]&&delete e.plugins.entries["claude-mem"],e.plugins?.slots?.memory==="claude-mem"&&delete e.plugins.slots.memory,ho(e)}function Eo(){let n=go();if(!n)return console.error("Could not find pre-built OpenClaw plugin bundle."),console.error(" Expected at: openclaw/dist/index.js"),console.error(" Ensure the npm package includes the openclaw directory."),1;let e=xe(),o=h.join(e,"dist");try{mo(o,{recursive:!0}),Gt(n,o,{recursive:!0,force:!0}),console.log(` Plugin dist copied to: ${o}`);let r=Co();if(r){let t=h.join(e,"openclaw.plugin.json");Gt(r,t,{force:!0}),console.log(` Plugin manifest copied to: ${t}`)}let s=fo();if(s){let t=h.join(e,"skills");Gt(s,t,{recursive:!0,force:!0}),console.log(` Skills copied to: ${t}`)}let u={name:"claude-mem",version:"1.0.0",type:"module",main:"dist/index.js",openclaw:{extensions:["./dist/index.js"]}};return lo(h.join(e,"package.json"),JSON.stringify(u,null,2)+`
|
|
199
|
-
`,"utf-8"),Ns(),console.log(" Registered in openclaw.json"),l.info("OPENCLAW","Plugin installed",{destination:e}),0}catch(r){let s=r instanceof Error?r.message:String(r);return console.error(`Failed to install OpenClaw plugin: ${s}`),1}}function Gs(){let n=!1,e=xe();if(j(e))try{js(e,{recursive:!0,force:!0}),console.log(` Removed extension: ${e}`)}catch(o){let r=o instanceof Error?o.message:String(o);console.error(` Failed to remove extension directory: ${r}`),n=!0}try{Us(),console.log(" Unregistered from openclaw.json")}catch(o){let r=o instanceof Error?o.message:String(o);console.error(` Failed to update openclaw.json: ${r}`),n=!0}return n?1:0}function Ws(){console.log(`
|
|
209
|
+
`),0}}var Ro,B,Bo,We,At,En=p(()=>{"use strict";W();Le();Ct();xt();Ro=R.join(mi(),".codeium","windsurf"),B=R.join(Ro,"hooks.json"),Bo=6e3,We=R.join(O,"windsurf-projects.json"),At=["pre_user_prompt","post_write_code","post_run_command","post_mcp_tool_use","post_cascade_response"]});var xn={};X(xn,{checkOpenClawStatus:()=>_i,findPluginManifestPath:()=>Ko,findPluginSkillsDirectory:()=>Vo,findPreBuiltPluginDirectory:()=>Jo,getOpenClawClaudeMemExtensionDirectory:()=>Ke,getOpenClawConfigDirectory:()=>Je,getOpenClawConfigFilePath:()=>ve,getOpenClawExtensionsDirectory:()=>Ho,installOpenClawIntegration:()=>bi,installOpenClawPlugin:()=>Yo,uninstallOpenClawPlugin:()=>Si});import x from"path";import{homedir as Mt}from"os";import{existsSync as K,readFileSync as Fi,writeFileSync as Go,mkdirSync as Wo,cpSync as Fn,rmSync as yi}from"fs";function Je(){return x.join(Mt(),".openclaw")}function Ho(){return x.join(Je(),"extensions")}function Ke(){return x.join(Ho(),"claude-mem")}function ve(){return x.join(Je(),"openclaw.json")}function Jo(){let t=[x.join(process.env.CLAUDE_CONFIG_DIR||x.join(Mt(),".claude"),"plugins","marketplaces","thedotmack"),process.cwd()];for(let e of t){let o=x.join(e,"openclaw","dist"),r=x.join(o,"index.js");if(K(r))return o}return null}function Ko(){let t=[x.join(process.env.CLAUDE_CONFIG_DIR||x.join(Mt(),".claude"),"plugins","marketplaces","thedotmack"),process.cwd()];for(let e of t){let o=x.join(e,"openclaw","openclaw.plugin.json");if(K(o))return o}return null}function Vo(){let t=[x.join(process.env.CLAUDE_CONFIG_DIR||x.join(Mt(),".claude"),"plugins","marketplaces","thedotmack"),process.cwd()];for(let e of t){let o=x.join(e,"openclaw","skills");if(K(o))return o}return null}function yn(){let t=ve();if(!K(t))return{};try{return JSON.parse(Fi(t,"utf-8"))}catch{return{}}}function Xo(t){let e=Je();Wo(e,{recursive:!0}),Go(ve(),JSON.stringify(t,null,2)+`
|
|
210
|
+
`,"utf-8")}function xi(t=37777,e="openclaw",o=!0){let r=yn();if(r.plugins||(r.plugins={}),r.plugins.slots||(r.plugins.slots={}),r.plugins.entries||(r.plugins.entries={}),r.plugins.slots.memory="claude-mem",!r.plugins.entries["claude-mem"])r.plugins.entries["claude-mem"]={enabled:!0,config:{workerPort:t,project:e,syncMemoryFile:o}};else{r.plugins.entries["claude-mem"].enabled=!0,r.plugins.entries["claude-mem"].config||(r.plugins.entries["claude-mem"].config={});let s=r.plugins.entries["claude-mem"].config;s.workerPort===void 0&&(s.workerPort=t),s.project===void 0&&(s.project=e),s.syncMemoryFile===void 0&&(s.syncMemoryFile=o)}Xo(r)}function vi(){let t=ve();if(!K(t))return;let e=yn();e.plugins?.entries?.["claude-mem"]&&delete e.plugins.entries["claude-mem"],e.plugins?.slots?.memory==="claude-mem"&&delete e.plugins.slots.memory,Xo(e)}function Yo(){let t=Jo();if(!t)return console.error("Could not find pre-built OpenClaw plugin bundle."),console.error(" Expected at: openclaw/dist/index.js"),console.error(" Ensure the npm package includes the openclaw directory."),1;let e=Ke(),o=x.join(e,"dist");try{Wo(o,{recursive:!0}),Fn(t,o,{recursive:!0,force:!0}),console.log(` Plugin dist copied to: ${o}`);let r=Ko();if(r){let n=x.join(e,"openclaw.plugin.json");Fn(r,n,{force:!0}),console.log(` Plugin manifest copied to: ${n}`)}let s=Vo();if(s){let n=x.join(e,"skills");Fn(s,n,{recursive:!0,force:!0}),console.log(` Skills copied to: ${n}`)}let i={name:"claude-mem",version:"1.0.0",type:"module",main:"dist/index.js",openclaw:{extensions:["./dist/index.js"]}};return Go(x.join(e,"package.json"),JSON.stringify(i,null,2)+`
|
|
211
|
+
`,"utf-8"),xi(),console.log(" Registered in openclaw.json"),m.info("OPENCLAW","Plugin installed",{destination:e}),0}catch(r){let s=r instanceof Error?r.message:String(r);return console.error(`Failed to install OpenClaw plugin: ${s}`),1}}function Si(){let t=!1,e=Ke();if(K(e))try{yi(e,{recursive:!0,force:!0}),console.log(` Removed extension: ${e}`)}catch(o){let r=o instanceof Error?o.message:String(o);console.error(` Failed to remove extension directory: ${r}`),t=!0}try{vi(),console.log(" Unregistered from openclaw.json")}catch(o){let r=o instanceof Error?o.message:String(o);console.error(` Failed to update openclaw.json: ${r}`),t=!0}return t?1:0}function _i(){console.log(`
|
|
200
212
|
Claude-Mem OpenClaw Integration Status
|
|
201
|
-
`);let
|
|
213
|
+
`);let t=Je(),e=Ke(),o=ve(),r=x.join(e,"dist","index.js");if(console.log(`Config directory: ${t}`),console.log(` Exists: ${K(t)?"yes":"no"}`),console.log(""),console.log(`Extension directory: ${e}`),console.log(` Exists: ${K(e)?"yes":"no"}`),console.log(` Plugin entry: ${K(r)?"yes":"no"}`),console.log(""),console.log(`Config (openclaw.json): ${o}`),K(o)){let s=yn(),i=s.plugins?.entries?.["claude-mem"]!==void 0,n=s.plugins?.entries?.["claude-mem"]?.enabled===!0,u=s.plugins?.slots?.memory==="claude-mem";if(console.log(" Exists: yes"),console.log(` Registered: ${i?"yes":"no"}`),console.log(` Enabled: ${n?"yes":"no"}`),console.log(` Memory slot: ${u?"yes":"no"}`),i){let c=s.plugins.entries["claude-mem"].config;c&&(console.log(` Worker port: ${c.workerPort??"default"}`),console.log(` Project: ${c.project??"default"}`),console.log(` Sync MEMORY.md: ${c.syncMemoryFile??"default"}`))}}else console.log(" Exists: no");return console.log(""),0}async function bi(){console.log(`
|
|
202
214
|
Installing Claude-Mem for OpenClaw...
|
|
203
|
-
`);let
|
|
215
|
+
`);let t=Yo();if(t!==0)return t;let e=Ke();return console.log(`
|
|
204
216
|
Installation complete!
|
|
205
217
|
|
|
206
218
|
Plugin installed to: ${e}
|
|
207
|
-
Config updated: ${
|
|
219
|
+
Config updated: ${ve()}
|
|
208
220
|
|
|
209
221
|
Next steps:
|
|
210
222
|
1. Start claude-mem worker: npx claude-mem start
|
|
211
223
|
2. Restart OpenClaw to load the plugin
|
|
212
224
|
3. Memory capture is automatic from then on
|
|
213
|
-
`),0}var
|
|
225
|
+
`),0}var vn=p(()=>{"use strict";W()});import zc from"path";var qo=p(()=>{"use strict";W()});import{existsSync as nl,readFileSync as ol,writeFileSync as rl,renameSync as sl}from"fs";import Ai from"path";import wi from"os";function zo(t,e){let o="<claude-mem-context>",r="</claude-mem-context>";if(!t)return`${o}
|
|
214
226
|
${e}
|
|
215
|
-
${r}`;let s=
|
|
227
|
+
${r}`;let s=t.indexOf(o),i=t.indexOf(r);return s!==-1&&i!==-1?t.substring(0,s)+`${o}
|
|
216
228
|
${e}
|
|
217
|
-
${r}`+
|
|
229
|
+
${r}`+t.substring(i+r.length):t+`
|
|
218
230
|
|
|
219
231
|
${o}
|
|
220
232
|
${e}
|
|
221
|
-
${r}`}var
|
|
222
|
-
`)}function
|
|
223
|
-
`),o=
|
|
233
|
+
${r}`}var ml,Zo=p(()=>{"use strict";W();qo();nn();Le();ml=Ai.join(wi.homedir(),".claude-mem","settings.json")});import{existsSync as fl,readFileSync as Cl,writeFileSync as hl,mkdirSync as El}from"fs";import{homedir as Qo}from"os";import{join as er,dirname as xl}from"path";var V,Ve,$i,It,tr=p(()=>{"use strict";V=er(Qo(),".claude-mem","transcript-watch.json"),Ve=er(Qo(),".claude-mem","transcript-watch-state.json"),$i={name:"codex",version:"0.3",description:"Schema for Codex session JSONL files under ~/.codex/sessions.",events:[{name:"session-meta",match:{path:"type",equals:"session_meta"},action:"session_context",fields:{sessionId:"payload.id",cwd:"payload.cwd"}},{name:"turn-context",match:{path:"type",equals:"turn_context"},action:"session_context",fields:{cwd:"payload.cwd"}},{name:"user-message",match:{path:"payload.type",equals:"user_message"},action:"session_init",fields:{prompt:"payload.message"}},{name:"assistant-message",match:{path:"payload.type",equals:"agent_message"},action:"assistant_message",fields:{message:"payload.message"}},{name:"tool-use",match:{path:"payload.type",in:["function_call","custom_tool_call","web_search_call","exec_command"]},action:"tool_use",fields:{toolId:"payload.call_id",toolName:{coalesce:["payload.name","payload.type",{value:"web_search"}]},toolInput:{coalesce:["payload.arguments","payload.input","payload.command","payload.action"]}}},{name:"tool-result",match:{path:"payload.type",in:["function_call_output","custom_tool_call_output","exec_command_output"]},action:"tool_result",fields:{toolId:"payload.call_id",toolResponse:"payload.output"}},{name:"session-end",match:{path:"payload.type",in:["turn_aborted","turn_completed"]},action:"session_end"}]},It={version:1,schemas:{codex:$i},watches:[{name:"codex",path:"~/.codex/sessions/**/*.jsonl",schema:"codex",startAtEnd:!0,context:{mode:"agents",path:"~/.codex/AGENTS.md",updateOn:["session_start","session_end"]}}],stateFile:Ve}});var bn={};X(bn,{checkCodexCliStatus:()=>Ri,installCodexCli:()=>Ti,uninstallCodexCli:()=>Bi});import Ot from"path";import{homedir as nr}from"os";import{existsSync as ce,readFileSync as Xe,writeFileSync as Ye,mkdirSync as or}from"fs";function _n(){let t=V;if(!ce(t))return{version:1,schemas:{},watches:[],stateFile:Ve};try{let e=Xe(t,"utf-8"),o=JSON.parse(e);return o.version||(o.version=1),o.watches||(o.watches=[]),o.schemas||(o.schemas={}),o.stateFile||(o.stateFile=Ve),o}catch(e){m.error("CODEX","Corrupt transcript-watch.json, creating backup",{path:t},e);let o=`${t}.backup.${Date.now()}`;return Ye(o,Xe(t)),console.warn(` Backed up corrupt transcript-watch.json to ${o}`),{version:1,schemas:{},watches:[],stateFile:Ve}}}function Mi(t){let e={...t};e.schemas={...e.schemas};let o=It.schemas?.[ne];o&&(e.schemas[ne]=o);let r=It.watches.find(s=>s.name===ne);if(r){let s=e.watches.findIndex(i=>i.name===ne);s!==-1?e.watches[s]=r:e.watches.push(r)}return e}function rr(t){or(ki,{recursive:!0}),Ye(V,JSON.stringify(t,null,2)+`
|
|
234
|
+
`)}function Ii(){try{or(Sn,{recursive:!0});let t="";ce($)&&(t=Xe($,"utf-8"));let e=["# Recent Activity","","<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->","","*No context yet. Complete your first session and context will appear here.*"].join(`
|
|
235
|
+
`),o=zo(t,e);Ye($,o),console.log(` Injected context placeholder into ${$}`)}catch(t){m.warn("CODEX","Failed to inject AGENTS.md context",{error:t.message}),console.warn(` Warning: Could not inject context into AGENTS.md: ${t.message}`)}}function Oi(){try{if(!ce($))return;let t=Xe($,"utf-8"),e="<claude-mem-context>",o="</claude-mem-context>",r=t.indexOf(e),s=t.indexOf(o);if(r===-1||s===-1)return;let i=t.substring(0,r).replace(/\n+$/,""),n=t.substring(s+o.length).replace(/^\n+/,""),u=(i+(n?`
|
|
224
236
|
|
|
225
|
-
`+
|
|
226
|
-
`):
|
|
237
|
+
`+n:"")).trim();u?Ye($,u+`
|
|
238
|
+
`):Ye($,""),console.log(` Removed context section from ${$}`)}catch(t){m.warn("CODEX","Failed to clean AGENTS.md context",{error:t.message})}}async function Ti(){console.log(`
|
|
227
239
|
Installing Claude-Mem for Codex CLI (transcript watching)...
|
|
228
|
-
`);try{let
|
|
240
|
+
`);try{let t=_n(),e=Mi(t);return rr(e),console.log(` Updated ${V}`),console.log(" Watch path: ~/.codex/sessions/**/*.jsonl"),console.log(` Schema: codex (v${It.schemas?.codex?.version??"?"})`),Ii(),console.log(`
|
|
229
241
|
Installation complete!
|
|
230
242
|
|
|
231
|
-
Transcript watch config: ${
|
|
232
|
-
Context file: ${
|
|
243
|
+
Transcript watch config: ${V}
|
|
244
|
+
Context file: ${$}
|
|
233
245
|
|
|
234
246
|
How it works:
|
|
235
247
|
- claude-mem watches Codex session JSONL files for new activity
|
|
236
248
|
- No hooks needed -- transcript watching is fully automatic
|
|
237
|
-
- Context from past sessions is injected via ${
|
|
249
|
+
- Context from past sessions is injected via ${$}
|
|
238
250
|
|
|
239
251
|
Next steps:
|
|
240
252
|
1. Start claude-mem worker: npx claude-mem start
|
|
241
253
|
2. Use Codex CLI as usual -- memory capture is automatic!
|
|
242
|
-
`),0}catch(
|
|
243
|
-
Installation failed: ${
|
|
254
|
+
`),0}catch(t){return console.error(`
|
|
255
|
+
Installation failed: ${t.message}`),1}}function Bi(){console.log(`
|
|
244
256
|
Uninstalling Claude-Mem Codex CLI integration...
|
|
245
|
-
`);try{if(
|
|
257
|
+
`);try{if(ce(V)){let t=_n();t.watches=t.watches.filter(e=>e.name!==ne),t.schemas&&delete t.schemas[ne],rr(t),console.log(` Removed codex watch from ${V}`)}else console.log(" No transcript-watch.json found -- nothing to remove.");return Oi(),console.log(`
|
|
246
258
|
Uninstallation complete!`),console.log(`Restart claude-mem worker to apply changes.
|
|
247
|
-
`),0}catch(
|
|
248
|
-
Uninstallation failed: ${
|
|
259
|
+
`),0}catch(t){return console.error(`
|
|
260
|
+
Uninstallation failed: ${t.message}`),1}}function Ri(){if(console.log(`
|
|
249
261
|
Claude-Mem Codex CLI Integration Status
|
|
250
|
-
`),!
|
|
262
|
+
`),!ce(V))return console.log("Status: Not installed"),console.log(` No transcript watch config at ${V}`),console.log(`
|
|
251
263
|
Run: npx claude-mem install --ide codex-cli
|
|
252
|
-
`),0;try{let
|
|
264
|
+
`),0;try{let t=_n(),e=t.watches.find(s=>s.name===ne),o=t.schemas?.[ne];if(!e)return console.log("Status: Not installed"),console.log(" transcript-watch.json exists but no codex watch configured."),console.log(`
|
|
253
265
|
Run: npx claude-mem install --ide codex-cli
|
|
254
|
-
`),0;console.log("Status: Installed"),console.log(` Config: ${
|
|
255
|
-
`)
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
${
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
${
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
${
|
|
266
|
+
`),0;console.log("Status: Installed"),console.log(` Config: ${V}`),console.log(` Watch path: ${e.path}`),console.log(` Schema: ${o?`codex (v${o.version??"?"})`:"missing"}`),console.log(` Start at end: ${e.startAtEnd??!1}`),e.context&&(console.log(` Context mode: ${e.context.mode}`),console.log(` Context path: ${e.context.path??"default"}`),console.log(` Context updates on: ${e.context.updateOn?.join(", ")??"none"}`)),ce($)?Xe($,"utf-8").includes("<claude-mem-context>")?console.log(` Context: Active (${$})`):console.log(" Context: AGENTS.md exists but no context tags"):console.log(" Context: No AGENTS.md file");let r=Ot.join(Sn,"sessions");ce(r)?console.log(" Sessions directory: exists"):console.log(" Sessions directory: not yet created (use Codex CLI to generate sessions)")}catch{console.log("Status: Unknown"),console.log(" Could not parse transcript-watch.json.")}return console.log(""),0}var Sn,$,ki,ne,An=p(()=>{"use strict";W();Zo();tr();Sn=Ot.join(nr(),".codex"),$=Ot.join(Sn,"AGENTS.md"),ki=Ot.join(nr(),".claude-mem"),ne="codex"});var lr={};X(lr,{MCP_IDE_INSTALLERS:()=>Xi,installGooseMcpIntegration:()=>cr});import T from"path";import{homedir as Ze}from"os";import{existsSync as ur,readFileSync as Pi,writeFileSync as ze,mkdirSync as ar}from"fs";function ji(t){return{command:process.execPath,args:[t]}}function Ni(t,e,o="mcpServers"){let r=T.dirname(t);ar(r,{recursive:!0});let s=j(t,{});s[o]||(s[o]={}),s[o]["claude-mem"]=ji(e),ze(t,JSON.stringify(s,null,2)+`
|
|
267
|
+
`)}function qe(t){return async()=>{console.log(`
|
|
268
|
+
Installing Claude-Mem MCP integration for ${t.ideLabel}...
|
|
269
|
+
`);let e=rn();if(!e)return console.error("Could not find MCP server script"),console.error(" Expected at: ~/.claude/plugins/marketplaces/thedotmack/plugin/scripts/mcp-server.cjs"),1;try{let o=t.configPath;t.ideId==="warp"&&!ur(T.dirname(o))?console.log(" Note: ~/.warp/ not found. MCP may need to be configured via Warp Drive UI."):(Ni(o,e,t.configKey),console.log(` MCP config written to: ${o}`));let r;t.contextFile&&(r=t.contextFile.path,_t(r,Li),console.log(` Context placeholder written to: ${r}`));let s=[`
|
|
270
|
+
Installation complete!
|
|
271
|
+
`];return s.push(`MCP config: ${o}`),r&&s.push(`Context: ${r}`),s.push(""),s.push("Note: This is an MCP-only integration providing search tools and context."),s.push(`Transcript capture is not available for ${t.ideLabel}.`),t.ideId==="warp"&&s.push("If MCP config via file is not supported, configure MCP through Warp Drive UI."),s.push(""),s.push("Next steps:"),s.push(" 1. Start claude-mem worker: npx claude-mem start"),s.push(` 2. Restart ${t.ideLabel} to pick up the MCP server`),s.push(""),console.log(s.join(`
|
|
272
|
+
`)),0}catch(o){return console.error(`
|
|
273
|
+
Installation failed: ${o.message}`),1}}}function Ki(){return T.join(Ze(),".config","goose","config.yaml")}function Vi(t){return t.includes("claude-mem:")&&t.includes("mcpServers:")}function sr(t){return["mcpServers:"," claude-mem:",` command: ${process.execPath}`," args:",` - ${t}`].join(`
|
|
274
|
+
`)}function ir(t){return[" claude-mem:",` command: ${process.execPath}`," args:",` - ${t}`].join(`
|
|
275
|
+
`)}async function cr(){console.log(`
|
|
276
|
+
Installing Claude-Mem MCP integration for Goose...
|
|
277
|
+
`);let t=rn();if(!t)return console.error("Could not find MCP server script"),console.error(" Expected at: ~/.claude/plugins/marketplaces/thedotmack/plugin/scripts/mcp-server.cjs"),1;try{let e=Ki(),o=T.dirname(e);if(ar(o,{recursive:!0}),ur(e)){let r=Pi(e,"utf-8");if(Vi(r)){let s=/( {2}claude-mem:\n(?:.*\n)*?(?= {2}\S|\n\n|^\S|$))/m,i=ir(t)+`
|
|
278
|
+
`;s.test(r)&&(r=r.replace(s,i)),ze(e,r),console.log(` Updated existing claude-mem entry in: ${e}`)}else if(r.includes("mcpServers:")){let i=r.indexOf("mcpServers:")+11,n=`
|
|
279
|
+
`+ir(t);r=r.slice(0,i)+n+r.slice(i),ze(e,r),console.log(` Added claude-mem to existing mcpServers in: ${e}`)}else{let s=`
|
|
280
|
+
`+sr(t)+`
|
|
281
|
+
`;r=r.trimEnd()+`
|
|
282
|
+
`+s,ze(e,r),console.log(` Appended mcpServers section to: ${e}`)}}else{let r=sr(t)+`
|
|
283
|
+
`;ze(e,r),console.log(` Created config with MCP server: ${e}`)}return console.log(`
|
|
284
|
+
Installation complete!
|
|
285
|
+
|
|
286
|
+
MCP config: ${e}
|
|
287
|
+
|
|
288
|
+
Note: This is an MCP-only integration providing search tools and context.
|
|
289
|
+
Transcript capture is not available for Goose.
|
|
290
|
+
|
|
291
|
+
Next steps:
|
|
292
|
+
1. Start claude-mem worker: npx claude-mem start
|
|
293
|
+
2. Restart Goose to pick up the MCP server
|
|
294
|
+
`),0}catch(e){return console.error(`
|
|
295
|
+
Installation failed: ${e.message}`),1}}var Li,Ui,Gi,Wi,Hi,Ji,Xi,Dr=p(()=>{"use strict";xt();be();dn();Li=`# claude-mem: Cross-Session Memory
|
|
296
|
+
|
|
297
|
+
*No context yet. Complete your first session and context will appear here.*
|
|
298
|
+
|
|
299
|
+
Use claude-mem's MCP search tools for manual memory queries.`;Ui={ideId:"copilot-cli",ideLabel:"Copilot CLI",configPath:T.join(Ze(),".github","copilot","mcp.json"),configKey:"servers",contextFile:{path:T.join(process.cwd(),".github","copilot-instructions.md"),isWorkspaceRelative:!0}},Gi={ideId:"antigravity",ideLabel:"Antigravity",configPath:T.join(Ze(),".gemini","antigravity","mcp_config.json"),configKey:"mcpServers",contextFile:{path:T.join(process.cwd(),".agent","rules","claude-mem-context.md"),isWorkspaceRelative:!0}},Wi={ideId:"crush",ideLabel:"Crush",configPath:T.join(Ze(),".config","crush","mcp.json"),configKey:"mcpServers"},Hi={ideId:"roo-code",ideLabel:"Roo Code",configPath:T.join(process.cwd(),".roo","mcp.json"),configKey:"mcpServers",contextFile:{path:T.join(process.cwd(),".roo","rules","claude-mem-context.md"),isWorkspaceRelative:!0}},Ji={ideId:"warp",ideLabel:"Warp",configPath:T.join(Ze(),".warp","mcp.json"),configKey:"mcpServers",contextFile:{path:T.join(process.cwd(),"WARP.md"),isWorkspaceRelative:!0}};Xi={"copilot-cli":qe(Ui),antigravity:qe(Gi),goose:cr,crush:qe(Wi),"roo-code":qe(Hi),warp:qe(Ji)}});var Tt={};X(Tt,{runInstallCommand:()=>iu});import{execSync as wn}from"child_process";import{cpSync as dr,existsSync as Qe,readFileSync as Yi,rmSync as mr}from"fs";import{join as Se}from"path";async function qi(t){if(oe)await pt(t);else for(let e of t){let o=await e.task(r=>console.log(` ${r}`));console.log(` ${o}`)}}function zi(){let t=j(pe(),{});t.thedotmack={source:{source:"github",repo:"thedotmack/claude-mem"},installLocation:w(),lastUpdated:new Date().toISOString(),autoUpdate:!0},$e(se()),z(pe(),t)}function Zi(t){let e=j(ge(),{});e.version||(e.version=2),e.plugins||(e.plugins={});let o=jt(t),r=new Date().toISOString();e.plugins["claude-mem@thedotmack"]=[{scope:"user",installPath:o,version:t,installedAt:r,lastUpdated:r}],z(ge(),e)}function Qi(){let t=j(fe(),{});t.enabledPlugins||(t.enabledPlugins={}),t.enabledPlugins["claude-mem@thedotmack"]=!0,z(fe(),t)}async function eu(t){let e=[];for(let o of t)switch(o){case"claude-code":{try{wn("claude plugin marketplace add thedotmack/claude-mem && claude plugin install claude-mem",{stdio:"inherit"}),g.success("Claude Code: plugin installed via CLI.")}catch{g.error("Claude Code: plugin install failed. Is `claude` CLI on your PATH?"),e.push(o)}break}case"cursor":g.warn("Cursor: integration not yet implemented. Skipping.");break;case"gemini-cli":{let{installGeminiCliHooks:r}=await Promise.resolve().then(()=>(ln(),cn));await r()===0?g.success("Gemini CLI: hooks installed."):(g.error("Gemini CLI: hook installation failed."),e.push(o));break}case"opencode":{let{installOpenCodeIntegration:r}=await Promise.resolve().then(()=>(gn(),pn));await r()===0?g.success("OpenCode: plugin installed."):(g.error("OpenCode: plugin installation failed."),e.push(o));break}case"windsurf":{let{installWindsurfHooks:r}=await Promise.resolve().then(()=>(En(),hn));await r()===0?g.success("Windsurf: hooks installed."):(g.error("Windsurf: hook installation failed."),e.push(o));break}case"openclaw":{let{installOpenClawIntegration:r}=await Promise.resolve().then(()=>(vn(),xn));await r()===0?g.success("OpenClaw: plugin installed."):(g.error("OpenClaw: plugin installation failed."),e.push(o));break}case"codex-cli":{let{installCodexCli:r}=await Promise.resolve().then(()=>(An(),bn));await r()===0?g.success("Codex CLI: transcript watching configured."):(g.error("Codex CLI: integration setup failed."),e.push(o));break}case"copilot-cli":case"antigravity":case"goose":case"crush":case"roo-code":case"warp":{let{MCP_IDE_INSTALLERS:r}=await Promise.resolve().then(()=>(Dr(),lr)),s=r[o];if(s){let i=await s(),c=Re().find(D=>D.id===o)?.label??o;i===0?g.success(`${c}: MCP integration installed.`):(g.error(`${c}: MCP integration failed.`),e.push(o))}break}default:{let s=Re().find(i=>i.id===o);s&&!s.supported&&g.warn(`Support for ${s.label} coming soon.`);break}}return e}async function tu(){let e=Re().filter(s=>s.detected);if(e.length===0)return g.warn("No supported IDEs detected. Installing for Claude Code by default."),["claude-code"];let o=e.map(s=>({value:s.id,label:s.label,hint:s.supported?s.hint:"coming soon"})),r=await lo({message:"Which IDEs do you use?",options:o,initialValues:e.filter(s=>s.supported).map(s=>s.id),required:!0});return Q(r)&&(Te("Installation cancelled."),process.exit(0)),r}function nu(){let t=w(),e=rt();$e(t);let o=["plugin","package.json","package-lock.json","node_modules","openclaw","dist","LICENSE","README.md","CHANGELOG.md"];for(let r of o){let s=Se(e,r),i=Se(t,r);Qe(s)&&(Qe(i)&&mr(i,{recursive:!0,force:!0}),dr(s,i,{recursive:!0,force:!0}))}}function ou(t){let e=Nt(),o=jt(t);mr(o,{recursive:!0,force:!0}),$e(o),dr(e,o,{recursive:!0,force:!0})}function ru(){let t=w(),e=Se(t,"package.json");Qe(e)&&wn("npm install --production",{cwd:t,stdio:"pipe",...Y?{shell:!0}:{}})}function su(){let t=Se(w(),"plugin","scripts","smart-install.js");if(!Qe(t))return g.warn("smart-install.js not found \u2014 skipping Bun/uv auto-install."),!1;try{return wn(`node "${t}"`,{stdio:"inherit",...Y?{shell:!0}:{}}),!0}catch{return g.warn("smart-install encountered an issue. You may need to install Bun/uv manually."),!1}}async function iu(t={}){let e=we();oe?mt(C.default.bgCyan(C.default.black(" claude-mem install "))):console.log("claude-mem install"),g.info(`Version: ${C.default.cyan(e)}`),g.info(`Platform: ${process.platform} (${process.arch})`);let o=w();if(Qe(Se(o,"plugin",".claude-plugin","plugin.json"))){try{let l=JSON.parse(Yi(Se(o,"plugin",".claude-plugin","plugin.json"),"utf-8"));g.warn(`Existing installation detected (v${l.version??"unknown"}).`)}catch{g.warn("Existing installation detected.")}if(process.stdin.isTTY){let l=await Ie({message:"Overwrite existing installation?",initialValue:!0});(Q(l)||!l)&&(Te("Installation cancelled."),process.exit(0))}}let s;if(t.ide){s=[t.ide];let l=Re(),y=l.find(v=>v.id===t.ide);y&&!y.supported&&(g.error(`Support for ${y.label} coming soon.`),process.exit(1)),y||(g.error(`Unknown IDE: ${t.ide}`),g.info(`Available IDEs: ${l.map(v=>v.id).join(", ")}`),process.exit(1))}else process.stdin.isTTY?s=await tu():s=["claude-code"];s.some(l=>l!=="claude-code")&&await qi([{title:"Copying plugin files",task:async l=>(l("Copying to marketplace directory..."),nu(),`Plugin files copied ${C.default.green("OK")}`)},{title:"Caching plugin version",task:async l=>(l(`Caching v${e}...`),ou(e),`Plugin cached (v${e}) ${C.default.green("OK")}`)},{title:"Registering marketplace",task:async()=>(zi(),`Marketplace registered ${C.default.green("OK")}`)},{title:"Registering plugin",task:async()=>(Zi(e),`Plugin registered ${C.default.green("OK")}`)},{title:"Enabling plugin in Claude settings",task:async()=>(Qi(),`Plugin enabled ${C.default.green("OK")}`)},{title:"Installing dependencies",task:async l=>{l("Running npm install...");try{return ru(),`Dependencies installed ${C.default.green("OK")}`}catch{return`Dependencies may need manual install ${C.default.yellow("!")}`}}},{title:"Setting up Bun and uv",task:async l=>(l("Running smart-install..."),su()?`Runtime dependencies ready ${C.default.green("OK")}`:`Runtime setup may need attention ${C.default.yellow("!")}`)}]);let n=await eu(s),u=n.length>0?"Installation Partial":"Installation Complete",c=[`Version: ${C.default.cyan(e)}`,`Plugin dir: ${C.default.cyan(o)}`,`IDEs: ${C.default.cyan(s.join(", "))}`];n.length>0&&c.push(`Failed: ${C.default.red(n.join(", "))}`),oe?Oe(c.join(`
|
|
300
|
+
`),u):(console.log(`
|
|
301
|
+
${u}`),c.forEach(l=>console.log(` ${l}`)));let D=process.env.CLAUDE_MEM_WORKER_PORT||"37777",d=["Open Claude Code and start a conversation -- memory is automatic!",`View your memories: ${C.default.underline(`http://localhost:${D}`)}`,`Search past work: use ${C.default.bold("/mem-search")} in Claude Code`,`Start worker: ${C.default.bold("npx claude-mem start")}`];oe?(Oe(d.join(`
|
|
302
|
+
`),"Next Steps"),n.length>0?ue(C.default.yellow("claude-mem installed with some IDE setup failures.")):ue(C.default.green("claude-mem installed successfully!"))):(console.log(`
|
|
303
|
+
Next Steps`),d.forEach(l=>console.log(` ${l}`)),n.length>0?(console.log(`
|
|
304
|
+
claude-mem installed with some IDE setup failures.`),process.exitCode=1):console.log(`
|
|
305
|
+
claude-mem installed successfully!`))}var C,oe,g,Bt=p(()=>{"use strict";Zt();C=re(me(),1);ie();be();po();oe=process.stdin.isTTY===!0;g={info:t=>oe?b.info(t):console.log(` ${t}`),success:t=>oe?b.success(t):console.log(` ${t}`),warn:t=>oe?b.warn(t):console.warn(` ${t}`),error:t=>oe?b.error(t):console.error(` ${t}`)}});var fr={};X(fr,{runUninstallCommand:()=>mu});import{existsSync as pr,rmSync as gr}from"fs";import{join as uu}from"path";function au(){let t=w();return pr(t)?(gr(t,{recursive:!0,force:!0}),!0):!1}function cu(){let t=uu(se(),"cache","thedotmack","claude-mem");return pr(t)?(gr(t,{recursive:!0,force:!0}),!0):!1}function lu(){let t=j(pe(),{});t.thedotmack&&(delete t.thedotmack,z(pe(),t))}function Du(){let t=j(ge(),{});t.plugins?.["claude-mem@thedotmack"]&&(delete t.plugins["claude-mem@thedotmack"],z(ge(),t))}function du(){let t=j(fe(),{});t.enabledPlugins?.["claude-mem@thedotmack"]!==void 0&&(delete t.enabledPlugins["claude-mem@thedotmack"],z(fe(),t))}async function mu(){if(mt(P.default.bgRed(P.default.white(" claude-mem uninstall "))),st()){if(process.stdin.isTTY){let o=await Ie({message:"Are you sure you want to uninstall claude-mem?",initialValue:!1});if(Q(o)||!o){Te("Uninstall cancelled.");return}}}else if(b.warn("claude-mem does not appear to be installed."),process.stdin.isTTY){let o=await Ie({message:"Clean up any remaining registration data anyway?",initialValue:!1});if(Q(o)||!o){ue("Nothing to do.");return}}else{ue("Nothing to do.");return}let t=process.env.CLAUDE_MEM_WORKER_PORT||"37777";try{await fetch(`http://127.0.0.1:${t}/api/admin/shutdown`,{method:"POST",signal:AbortSignal.timeout(5e3)});for(let o=0;o<20;o++){await new Promise(r=>setTimeout(r,500));try{await fetch(`http://127.0.0.1:${t}/api/health`,{signal:AbortSignal.timeout(1e3)})}catch{break}}b.info("Worker service stopped.")}catch{}await pt([{title:"Removing marketplace directory",task:async()=>au()?`Marketplace directory removed ${P.default.green("OK")}`:`Marketplace directory not found ${P.default.dim("skipped")}`},{title:"Removing cache directory",task:async()=>cu()?`Cache directory removed ${P.default.green("OK")}`:`Cache directory not found ${P.default.dim("skipped")}`},{title:"Removing marketplace registration",task:async()=>(lu(),`Marketplace registration removed ${P.default.green("OK")}`)},{title:"Removing plugin registration",task:async()=>(Du(),`Plugin registration removed ${P.default.green("OK")}`)},{title:"Removing from Claude settings",task:async()=>(du(),`Claude settings updated ${P.default.green("OK")}`)}]);let e=[{label:"Gemini CLI hooks",fn:async()=>{let{uninstallGeminiCliHooks:o}=await Promise.resolve().then(()=>(ln(),cn));return o()}},{label:"Windsurf hooks",fn:async()=>{let{uninstallWindsurfHooks:o}=await Promise.resolve().then(()=>(En(),hn));return o()}},{label:"OpenCode plugin",fn:async()=>{let{uninstallOpenCodePlugin:o}=await Promise.resolve().then(()=>(gn(),pn));return o()}},{label:"OpenClaw plugin",fn:async()=>{let{uninstallOpenClawPlugin:o}=await Promise.resolve().then(()=>(vn(),xn));return o()}},{label:"Codex CLI",fn:async()=>{let{uninstallCodexCli:o}=await Promise.resolve().then(()=>(An(),bn));return o()}}];for(let{label:o,fn:r}of e)try{await r()===0&&b.info(`${o}: removed.`)}catch{}Oe([`Your data directory at ${P.default.cyan("~/.claude-mem")} was preserved.`,"To remove it manually: rm -rf ~/.claude-mem"].join(`
|
|
306
|
+
`),"Note"),ue(P.default.green("claude-mem has been uninstalled."))}var P,Cr=p(()=>{"use strict";Zt();P=re(me(),1);ie();be()});import{spawnSync as pu}from"child_process";import{existsSync as gu}from"fs";import{homedir as $n}from"os";import{join as kn}from"path";function fu(){return Y?[kn($n(),".bun","bin","bun.exe"),kn(process.env.USERPROFILE||$n(),".bun","bin","bun.exe")]:[kn($n(),".bun","bin","bun"),"/usr/local/bin/bun","/opt/homebrew/bin/bun","/home/linuxbrew/.linuxbrew/bin/bun"]}function hr(){let e=pu(Y?"where":"which",["bun"],{encoding:"utf-8",stdio:["pipe","pipe","pipe"],shell:Y});if(e.status===0&&e.stdout.trim())return"bun";for(let o of fu())if(gu(o))return o;return null}var Er=p(()=>{"use strict";ie()});var le={};X(le,{runRestartCommand:()=>Fu,runSearchCommand:()=>xu,runStartCommand:()=>hu,runStatusCommand:()=>yu,runStopCommand:()=>Eu,runTranscriptWatchCommand:()=>vu});import{spawn as Fr}from"child_process";import{existsSync as yr}from"fs";import{join as xr}from"path";function Mn(){st()||(console.error(k.default.red("claude-mem is not installed.")),console.error(`Run: ${k.default.bold("npx claude-mem install")}`),process.exit(1))}function vr(){let t=hr();return t||(console.error(k.default.red("Bun not found.")),console.error("Install Bun: https://bun.sh"),console.error("After installation, restart your terminal."),process.exit(1)),t}function Cu(){return xr(w(),"plugin","scripts","worker-service.cjs")}function et(t,e=[]){Mn();let o=vr(),r=Cu();yr(r)||(console.error(k.default.red(`Worker script not found at: ${r}`)),console.error("The installation may be corrupted. Try: npx claude-mem install"),process.exit(1));let s=[r,t,...e],i=Fr(o,s,{stdio:"inherit",cwd:w(),env:process.env});i.on("error",n=>{console.error(k.default.red(`Failed to start Bun: ${n.message}`)),process.exit(1)}),i.on("close",n=>{process.exit(n??0)})}function hu(){et("start")}function Eu(){et("stop")}function Fu(){et("restart")}function yu(){et("status")}async function xu(t){Mn();let e=t.join(" ").trim();e||(console.error(k.default.red("Usage: npx claude-mem search <query>")),process.exit(1));let r=`http://127.0.0.1:${process.env.CLAUDE_MEM_WORKER_PORT||"37777"}/api/search?q=${encodeURIComponent(e)}`;try{let s=await fetch(r);s.ok||(s.status===404&&(console.error(k.default.red("Search endpoint not found. Is the worker running?")),console.error(`Try: ${k.default.bold("npx claude-mem start")}`),process.exit(1)),console.error(k.default.red(`Search failed: HTTP ${s.status}`)),process.exit(1));let i=await s.json();console.log(typeof i=="object"&&i!==null?JSON.stringify(i,null,2):i)}catch(s){(s?.cause?.code==="ECONNREFUSED"||s?.message?.includes("ECONNREFUSED"))&&(console.error(k.default.red("Worker is not running.")),console.error(`Start it with: ${k.default.bold("npx claude-mem start")}`),process.exit(1)),console.error(k.default.red(`Search failed: ${s.message}`)),process.exit(1)}}function vu(){Mn();let t=vr(),e=xr(w(),"plugin","scripts","transcript-watcher.cjs");if(!yr(e)){et("transcript",["watch"]);return}let o=Fr(t,[e,"watch"],{stdio:"inherit",cwd:w(),env:process.env});o.on("error",r=>{console.error(k.default.red(`Failed to start transcript watcher: ${r.message}`)),process.exit(1)}),o.on("close",r=>{process.exit(r??0)})}var k,De=p(()=>{"use strict";k=re(me(),1);Er();ie()});var F=re(me(),1);ie();var tt=process.argv.slice(2),Sr=tt[0]?.toLowerCase()??"";function Su(){let t=we();console.log(`
|
|
307
|
+
${F.default.bold("claude-mem")} v${t} \u2014 persistent memory for AI coding assistants
|
|
308
|
+
|
|
309
|
+
${F.default.bold("Install Commands")} (no Bun required):
|
|
310
|
+
${F.default.cyan("npx claude-mem")} Interactive install
|
|
311
|
+
${F.default.cyan("npx claude-mem install")} Interactive install
|
|
312
|
+
${F.default.cyan("npx claude-mem install --ide <id>")} Install for specific IDE
|
|
313
|
+
${F.default.cyan("npx claude-mem update")} Update to latest version
|
|
314
|
+
${F.default.cyan("npx claude-mem uninstall")} Remove plugin and configs
|
|
315
|
+
${F.default.cyan("npx claude-mem version")} Print version
|
|
316
|
+
|
|
317
|
+
${F.default.bold("Runtime Commands")} (requires Bun, delegates to installed plugin):
|
|
318
|
+
${F.default.cyan("npx claude-mem start")} Start worker service
|
|
319
|
+
${F.default.cyan("npx claude-mem stop")} Stop worker service
|
|
320
|
+
${F.default.cyan("npx claude-mem restart")} Restart worker service
|
|
321
|
+
${F.default.cyan("npx claude-mem status")} Show worker status
|
|
322
|
+
${F.default.cyan("npx claude-mem search <query>")} Search observations
|
|
323
|
+
${F.default.cyan("npx claude-mem transcript watch")} Start transcript watcher
|
|
324
|
+
|
|
325
|
+
${F.default.bold("IDE Identifiers")}:
|
|
275
326
|
claude-code, cursor, gemini-cli, opencode, openclaw,
|
|
276
327
|
windsurf, codex-cli, copilot-cli, antigravity, goose,
|
|
277
328
|
crush, roo-code, warp
|
|
278
|
-
`)}async function
|
|
329
|
+
`)}async function _u(){switch(Sr){case"":{let{runInstallCommand:t}=await Promise.resolve().then(()=>(Bt(),Tt));await t();break}case"install":{let t=tt.indexOf("--ide"),e=t!==-1?tt[t+1]:void 0,{runInstallCommand:o}=await Promise.resolve().then(()=>(Bt(),Tt));await o({ide:e});break}case"update":case"upgrade":{let{runInstallCommand:t}=await Promise.resolve().then(()=>(Bt(),Tt));await t();break}case"uninstall":case"remove":{let{runUninstallCommand:t}=await Promise.resolve().then(()=>(Cr(),fr));await t();break}case"version":case"--version":case"-v":{console.log(we());break}case"help":case"--help":case"-h":{Su();break}case"start":{let{runStartCommand:t}=await Promise.resolve().then(()=>(De(),le));t();break}case"stop":{let{runStopCommand:t}=await Promise.resolve().then(()=>(De(),le));t();break}case"restart":{let{runRestartCommand:t}=await Promise.resolve().then(()=>(De(),le));t();break}case"status":{let{runStatusCommand:t}=await Promise.resolve().then(()=>(De(),le));t();break}case"search":{let{runSearchCommand:t}=await Promise.resolve().then(()=>(De(),le));await t(tt.slice(1));break}case"transcript":{let t=tt[1]?.toLowerCase();if(t==="watch"){let{runTranscriptWatchCommand:e}=await Promise.resolve().then(()=>(De(),le));e()}else console.error(F.default.red(`Unknown transcript subcommand: ${t??"(none)"}`)),console.error("Usage: npx claude-mem transcript watch"),process.exit(1);break}default:console.error(F.default.red(`Unknown command: ${Sr}`)),console.error(`Run ${F.default.bold("npx claude-mem --help")} for usage information.`),process.exit(1)}}_u().catch(t=>{console.error(F.default.red("Fatal error:"),t.message||t),process.exit(1)});
|