flavor-code 1.4.3-beta.2 → 1.4.4-beta.2

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.
Files changed (34) hide show
  1. package/README.md +27 -2
  2. package/README.zh-CN.md +27 -2
  3. package/dist/agent/loop.d.ts +1 -0
  4. package/dist/{app-G35YBHPR.js → app-C5I2TH7I.js} +399 -109
  5. package/dist/{chunk-FAJ6YDZK.js → chunk-36IDJRLQ.js} +1 -1
  6. package/dist/{chunk-HGTCIHWA.js → chunk-5BDKRA6U.js} +30 -1
  7. package/dist/{chunk-T6RE76D2.js → chunk-IKGT4MDT.js} +35 -23
  8. package/dist/{chunk-K7UGGWJV.js → chunk-JQM2L2YM.js} +1 -1
  9. package/dist/{chunk-6X62CGMA.js → chunk-ONRY3C2L.js} +3 -0
  10. package/dist/{chunk-IDJAHEG6.js → chunk-U4XTQ5PU.js} +392 -188
  11. package/dist/{chunk-SJUIIHIA.js → chunk-X6U6BO5D.js} +1 -1
  12. package/dist/{claude-ink-BE56DB6N.js → claude-ink-F554I3GJ.js} +1 -1
  13. package/dist/{cli-3MF6EL2H.js → cli-V3BLZ5UW.js} +7 -7
  14. package/dist/cli-main.js +16 -16
  15. package/dist/config/protected-file.d.ts +2 -0
  16. package/dist/config/schema.d.ts +3 -0
  17. package/dist/context/global-instructions.d.ts +12 -0
  18. package/dist/context/manager.d.ts +2 -0
  19. package/dist/desktop/main.js +660 -419
  20. package/dist/desktop-renderer/assets/{index-DCqIrF1S.js → index-CjC0Ibiq.js} +2 -2
  21. package/dist/desktop-renderer/assets/{interactive-terminal-B6GbpzIn.js → interactive-terminal-IjIT3Xoa.js} +1 -1
  22. package/dist/desktop-renderer/index.html +1 -1
  23. package/dist/{doctor-OHCGK52S.js → doctor-SEL32R7M.js} +3 -3
  24. package/dist/harness/local.d.ts +1 -0
  25. package/dist/{load-QK6CMLDF.js → load-RHWXNUCS.js} +2 -2
  26. package/dist/{manager-5SI4MPES.js → manager-IYBNNKUP.js} +2 -2
  27. package/dist/{production-6DIZ6YLQ.js → production-TD7UWWXW.js} +6 -6
  28. package/dist/production.d.ts +2 -0
  29. package/dist/sdk/index.js +6 -6
  30. package/dist/{store-ZIHN6363.js → store-MZZERW7K.js} +2 -2
  31. package/dist/ui/commands.d.ts +11 -3
  32. package/dist/ui/session.d.ts +2 -1
  33. package/package.json +1 -1
  34. package//346/212/200/346/234/257/346/226/271/346/241/210/346/212/245/345/221/212.md +649 -1
@@ -1,4 +1,4 @@
1
- import{i as e,n as t,r as n,t as r}from"./index-DCqIrF1S.js";var i=e(n(),1),a=2,o=1,s=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,n=window.getComputedStyle(this._terminal.element.parentElement),r=parseInt(n.getPropertyValue(`height`)),i=Math.max(0,parseInt(n.getPropertyValue(`width`))),s=window.getComputedStyle(this._terminal.element),c={top:parseInt(s.getPropertyValue(`padding-top`)),bottom:parseInt(s.getPropertyValue(`padding-bottom`)),right:parseInt(s.getPropertyValue(`padding-right`)),left:parseInt(s.getPropertyValue(`padding-left`))},l=c.top+c.bottom,u=c.right+c.left,d=r-l,f=i-u-t;return{cols:Math.max(a,Math.floor(f/e.css.cell.width)),rows:Math.max(o,Math.floor(d/e.css.cell.height))}}},c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,u=(e,t)=>{for(var n in t)c(e,n,{get:t[n],enumerable:!0})},d=(e,t,n,r)=>{for(var i=r>1?void 0:r?l(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&c(t,n,i),i},f=(e,t)=>(n,r)=>t(n,r,e),p=`Terminal input`,m={get:()=>p,set:e=>p=e},h=`Too much output to announce, navigate to rows manually to read`,g={get:()=>h,set:e=>h=e};function _(e){return e.replace(/\r?\n/g,`\r`)}function ee(e,t){return t?`\x1B[200~`+e+`\x1B[201~`:e}function te(e,t){e.clipboardData&&e.clipboardData.setData(`text/plain`,t.selectionText),e.preventDefault()}function ne(e,t,n,r){e.stopPropagation(),e.clipboardData&&re(e.clipboardData.getData(`text/plain`),t,n,r)}function re(e,t,n,r){e=_(e),e=ee(e,n.decPrivateModes.bracketedPasteMode&&r.rawOptions.ignoreBracketedPasteMode!==!0),n.triggerDataEvent(e,!0),t.value=``}function ie(e,t,n){let r=n.getBoundingClientRect(),i=e.clientX-r.left-10,a=e.clientY-r.top-10;t.style.width=`20px`,t.style.height=`20px`,t.style.left=`${i}px`,t.style.top=`${a}px`,t.style.zIndex=`1000`,t.focus()}function ae(e,t,n,r,i){ie(e,t,n),i&&r.rightClickSelect(e),t.value=r.selectionText,t.select()}function v(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function oe(e,t=0,n=e.length){let r=``;for(let i=t;i<n;++i){let t=e[i];t>65535?(t-=65536,r+=String.fromCharCode((t>>10)+55296)+String.fromCharCode(t%1024+56320)):r+=String.fromCharCode(t)}return r}var se=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i=0;if(this._interim){let n=e.charCodeAt(i++);56320<=n&&n<=57343?t[r++]=(this._interim-55296)*1024+n-56320+65536:(t[r++]=this._interim,t[r++]=n),this._interim=0}for(let a=i;a<n;++a){let i=e.charCodeAt(a);if(55296<=i&&i<=56319){if(++a>=n)return this._interim=i,r;let o=e.charCodeAt(a);56320<=o&&o<=57343?t[r++]=(i-55296)*1024+o-56320+65536:(t[r++]=i,t[r++]=o);continue}i!==65279&&(t[r++]=i)}return r}},y=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i,a,o,s,c=0,l=0;if(this.interim[0]){let i=!1,a=this.interim[0];a&=(a&224)==192?31:(a&240)==224?15:7;let o=0,s;for(;(s=this.interim[++o]&63)&&o<4;)a<<=6,a|=s;let c=(this.interim[0]&224)==192?2:(this.interim[0]&240)==224?3:4,u=c-o;for(;l<u;){if(l>=n)return 0;if(s=e[l++],(s&192)!=128){l--,i=!0;break}else this.interim[o++]=s,a<<=6,a|=s&63}i||(c===2?a<128?l--:t[r++]=a:c===3?a<2048||a>=55296&&a<=57343||a===65279||(t[r++]=a):a<65536||a>1114111||(t[r++]=a)),this.interim.fill(0)}let u=n-4,d=l;for(;d<n;){for(;d<u&&!((i=e[d])&128)&&!((a=e[d+1])&128)&&!((o=e[d+2])&128)&&!((s=e[d+3])&128);)t[r++]=i,t[r++]=a,t[r++]=o,t[r++]=s,d+=4;if(i=e[d++],i<128)t[r++]=i;else if((i&224)==192){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(c=(i&31)<<6|a&63,c<128){d--;continue}t[r++]=c}else if((i&240)==224){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(c=(i&15)<<12|(a&63)<<6|o&63,c<2048||c>=55296&&c<=57343||c===65279)continue;t[r++]=c}else if((i&248)==240){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,this.interim[2]=o,r;if(s=e[d++],(s&192)!=128){d--;continue}if(c=(i&7)<<18|(a&63)<<12|(o&63)<<6|s&63,c<65536||c>1114111)continue;t[r++]=c}}return r}},ce=``,le=` `,ue=class e{constructor(){this.fg=0,this.bg=0,this.extended=new b}static toColorRGB(e){return[e>>>16&255,e>>>8&255,e&255]}static fromColorRGB(e){return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255}clone(){let t=new e;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)==50331648}isBgRGB(){return(this.bg&50331648)==50331648}isFgPalette(){return(this.fg&50331648)==16777216||(this.fg&50331648)==33554432}isBgPalette(){return(this.bg&50331648)==16777216||(this.bg&50331648)==33554432}isFgDefault(){return(this.fg&50331648)==0}isBgDefault(){return(this.bg&50331648)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==16777216||(this.extended.underlineColor&50331648)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},b=class e{constructor(e=0,t=0){this._ext=0,this._urlId=0,this._ext=e,this._urlId=t}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(e){this._ext=e}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(e){this._ext&=-469762049,this._ext|=e<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(e){this._ext&=-67108864,this._ext|=e&67108863}get urlId(){return this._urlId}set urlId(e){this._urlId=e}get underlineVariantOffset(){let e=(this._ext&3758096384)>>29;return e<0?e^4294967288:e}set underlineVariantOffset(e){this._ext&=536870911,this._ext|=e<<29&3758096384}clone(){return new e(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},x=class e extends ue{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new b,this.combinedData=``}static fromCharData(t){let n=new e;return n.setFromCharData(t),n}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?v(this.content&2097151):``}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(e){this.fg=e[0],this.bg=0;let t=!1;if(e[1].length>2)t=!0;else if(e[1].length===2){let n=e[1].charCodeAt(0);if(55296<=n&&n<=56319){let r=e[1].charCodeAt(1);56320<=r&&r<=57343?this.content=(n-55296)*1024+r-56320+65536|e[2]<<22:t=!0}else t=!0}else this.content=e[1].charCodeAt(0)|e[2]<<22;t&&(this.combinedData=e[1],this.content=2097152|e[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},de=`di$target`,fe=`di$dependencies`,S=new Map;function pe(e){return e[fe]||[]}function C(e){if(S.has(e))return S.get(e);let t=function(e,n,r){if(arguments.length!==3)throw Error(`@IServiceName-decorator can only be used to decorate a parameter`);me(t,e,r)};return t._id=e,S.set(e,t),t}function me(e,t,n){t[de]===t?t[fe].push({id:e,index:n}):(t[fe]=[{id:e,index:n}],t[de]=t)}var w=C(`BufferService`),he=C(`CoreMouseService`),T=C(`CoreService`),ge=C(`CharsetService`),E=C(`InstantiationService`),_e=C(`LogService`),D=C(`OptionsService`),ve=C(`OscLinkService`),ye=C(`UnicodeService`),be=C(`DecorationService`),xe=class{constructor(e,t,n){this._bufferService=e,this._optionsService=t,this._oscLinkService=n}provideLinks(e,t){let n=this._bufferService.buffer.lines.get(e-1);if(!n){t(void 0);return}let r=[],i=this._optionsService.rawOptions.linkHandler,a=new x,o=n.getTrimmedLength(),s=-1,c=-1,l=!1;for(let t=0;t<o;t++)if(!(c===-1&&!n.hasContent(t))){if(n.loadCell(t,a),a.hasExtendedAttrs()&&a.extended.urlId)if(c===-1){c=t,s=a.extended.urlId;continue}else l=a.extended.urlId!==s;else c!==-1&&(l=!0);if(l||c!==-1&&t===o-1){let n=this._oscLinkService.getLinkData(s)?.uri;if(n){let a={start:{x:c+1,y:e},end:{x:t+ +(!l&&t===o-1),y:e}},s=!1;if(!i?.allowNonHttpProtocols)try{let e=new URL(n);[`http:`,`https:`].includes(e.protocol)||(s=!0)}catch{s=!0}s||r.push({text:n,range:a,activate:(e,t)=>i?i.activate(e,t,a):Se(e,t),hover:(e,t)=>i?.hover?.(e,t,a),leave:(e,t)=>i?.leave?.(e,t,a)})}l=!1,a.hasExtendedAttrs()&&a.extended.urlId?(c=t,s=a.extended.urlId):(c=-1,s=-1)}}t(r)}};xe=d([f(0,w),f(1,D),f(2,ve)],xe);function Se(e,t){if(confirm(`Do you want to navigate to ${t}?
1
+ import{i as e,n as t,r as n,t as r}from"./index-CjC0Ibiq.js";var i=e(n(),1),a=2,o=1,s=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,n=window.getComputedStyle(this._terminal.element.parentElement),r=parseInt(n.getPropertyValue(`height`)),i=Math.max(0,parseInt(n.getPropertyValue(`width`))),s=window.getComputedStyle(this._terminal.element),c={top:parseInt(s.getPropertyValue(`padding-top`)),bottom:parseInt(s.getPropertyValue(`padding-bottom`)),right:parseInt(s.getPropertyValue(`padding-right`)),left:parseInt(s.getPropertyValue(`padding-left`))},l=c.top+c.bottom,u=c.right+c.left,d=r-l,f=i-u-t;return{cols:Math.max(a,Math.floor(f/e.css.cell.width)),rows:Math.max(o,Math.floor(d/e.css.cell.height))}}},c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,u=(e,t)=>{for(var n in t)c(e,n,{get:t[n],enumerable:!0})},d=(e,t,n,r)=>{for(var i=r>1?void 0:r?l(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&c(t,n,i),i},f=(e,t)=>(n,r)=>t(n,r,e),p=`Terminal input`,m={get:()=>p,set:e=>p=e},h=`Too much output to announce, navigate to rows manually to read`,g={get:()=>h,set:e=>h=e};function _(e){return e.replace(/\r?\n/g,`\r`)}function ee(e,t){return t?`\x1B[200~`+e+`\x1B[201~`:e}function te(e,t){e.clipboardData&&e.clipboardData.setData(`text/plain`,t.selectionText),e.preventDefault()}function ne(e,t,n,r){e.stopPropagation(),e.clipboardData&&re(e.clipboardData.getData(`text/plain`),t,n,r)}function re(e,t,n,r){e=_(e),e=ee(e,n.decPrivateModes.bracketedPasteMode&&r.rawOptions.ignoreBracketedPasteMode!==!0),n.triggerDataEvent(e,!0),t.value=``}function ie(e,t,n){let r=n.getBoundingClientRect(),i=e.clientX-r.left-10,a=e.clientY-r.top-10;t.style.width=`20px`,t.style.height=`20px`,t.style.left=`${i}px`,t.style.top=`${a}px`,t.style.zIndex=`1000`,t.focus()}function ae(e,t,n,r,i){ie(e,t,n),i&&r.rightClickSelect(e),t.value=r.selectionText,t.select()}function v(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function oe(e,t=0,n=e.length){let r=``;for(let i=t;i<n;++i){let t=e[i];t>65535?(t-=65536,r+=String.fromCharCode((t>>10)+55296)+String.fromCharCode(t%1024+56320)):r+=String.fromCharCode(t)}return r}var se=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i=0;if(this._interim){let n=e.charCodeAt(i++);56320<=n&&n<=57343?t[r++]=(this._interim-55296)*1024+n-56320+65536:(t[r++]=this._interim,t[r++]=n),this._interim=0}for(let a=i;a<n;++a){let i=e.charCodeAt(a);if(55296<=i&&i<=56319){if(++a>=n)return this._interim=i,r;let o=e.charCodeAt(a);56320<=o&&o<=57343?t[r++]=(i-55296)*1024+o-56320+65536:(t[r++]=i,t[r++]=o);continue}i!==65279&&(t[r++]=i)}return r}},y=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i,a,o,s,c=0,l=0;if(this.interim[0]){let i=!1,a=this.interim[0];a&=(a&224)==192?31:(a&240)==224?15:7;let o=0,s;for(;(s=this.interim[++o]&63)&&o<4;)a<<=6,a|=s;let c=(this.interim[0]&224)==192?2:(this.interim[0]&240)==224?3:4,u=c-o;for(;l<u;){if(l>=n)return 0;if(s=e[l++],(s&192)!=128){l--,i=!0;break}else this.interim[o++]=s,a<<=6,a|=s&63}i||(c===2?a<128?l--:t[r++]=a:c===3?a<2048||a>=55296&&a<=57343||a===65279||(t[r++]=a):a<65536||a>1114111||(t[r++]=a)),this.interim.fill(0)}let u=n-4,d=l;for(;d<n;){for(;d<u&&!((i=e[d])&128)&&!((a=e[d+1])&128)&&!((o=e[d+2])&128)&&!((s=e[d+3])&128);)t[r++]=i,t[r++]=a,t[r++]=o,t[r++]=s,d+=4;if(i=e[d++],i<128)t[r++]=i;else if((i&224)==192){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(c=(i&31)<<6|a&63,c<128){d--;continue}t[r++]=c}else if((i&240)==224){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(c=(i&15)<<12|(a&63)<<6|o&63,c<2048||c>=55296&&c<=57343||c===65279)continue;t[r++]=c}else if((i&248)==240){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,this.interim[2]=o,r;if(s=e[d++],(s&192)!=128){d--;continue}if(c=(i&7)<<18|(a&63)<<12|(o&63)<<6|s&63,c<65536||c>1114111)continue;t[r++]=c}}return r}},ce=``,le=` `,ue=class e{constructor(){this.fg=0,this.bg=0,this.extended=new b}static toColorRGB(e){return[e>>>16&255,e>>>8&255,e&255]}static fromColorRGB(e){return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255}clone(){let t=new e;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)==50331648}isBgRGB(){return(this.bg&50331648)==50331648}isFgPalette(){return(this.fg&50331648)==16777216||(this.fg&50331648)==33554432}isBgPalette(){return(this.bg&50331648)==16777216||(this.bg&50331648)==33554432}isFgDefault(){return(this.fg&50331648)==0}isBgDefault(){return(this.bg&50331648)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==16777216||(this.extended.underlineColor&50331648)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},b=class e{constructor(e=0,t=0){this._ext=0,this._urlId=0,this._ext=e,this._urlId=t}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(e){this._ext=e}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(e){this._ext&=-469762049,this._ext|=e<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(e){this._ext&=-67108864,this._ext|=e&67108863}get urlId(){return this._urlId}set urlId(e){this._urlId=e}get underlineVariantOffset(){let e=(this._ext&3758096384)>>29;return e<0?e^4294967288:e}set underlineVariantOffset(e){this._ext&=536870911,this._ext|=e<<29&3758096384}clone(){return new e(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},x=class e extends ue{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new b,this.combinedData=``}static fromCharData(t){let n=new e;return n.setFromCharData(t),n}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?v(this.content&2097151):``}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(e){this.fg=e[0],this.bg=0;let t=!1;if(e[1].length>2)t=!0;else if(e[1].length===2){let n=e[1].charCodeAt(0);if(55296<=n&&n<=56319){let r=e[1].charCodeAt(1);56320<=r&&r<=57343?this.content=(n-55296)*1024+r-56320+65536|e[2]<<22:t=!0}else t=!0}else this.content=e[1].charCodeAt(0)|e[2]<<22;t&&(this.combinedData=e[1],this.content=2097152|e[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},de=`di$target`,fe=`di$dependencies`,S=new Map;function pe(e){return e[fe]||[]}function C(e){if(S.has(e))return S.get(e);let t=function(e,n,r){if(arguments.length!==3)throw Error(`@IServiceName-decorator can only be used to decorate a parameter`);me(t,e,r)};return t._id=e,S.set(e,t),t}function me(e,t,n){t[de]===t?t[fe].push({id:e,index:n}):(t[fe]=[{id:e,index:n}],t[de]=t)}var w=C(`BufferService`),he=C(`CoreMouseService`),T=C(`CoreService`),ge=C(`CharsetService`),E=C(`InstantiationService`),_e=C(`LogService`),D=C(`OptionsService`),ve=C(`OscLinkService`),ye=C(`UnicodeService`),be=C(`DecorationService`),xe=class{constructor(e,t,n){this._bufferService=e,this._optionsService=t,this._oscLinkService=n}provideLinks(e,t){let n=this._bufferService.buffer.lines.get(e-1);if(!n){t(void 0);return}let r=[],i=this._optionsService.rawOptions.linkHandler,a=new x,o=n.getTrimmedLength(),s=-1,c=-1,l=!1;for(let t=0;t<o;t++)if(!(c===-1&&!n.hasContent(t))){if(n.loadCell(t,a),a.hasExtendedAttrs()&&a.extended.urlId)if(c===-1){c=t,s=a.extended.urlId;continue}else l=a.extended.urlId!==s;else c!==-1&&(l=!0);if(l||c!==-1&&t===o-1){let n=this._oscLinkService.getLinkData(s)?.uri;if(n){let a={start:{x:c+1,y:e},end:{x:t+ +(!l&&t===o-1),y:e}},s=!1;if(!i?.allowNonHttpProtocols)try{let e=new URL(n);[`http:`,`https:`].includes(e.protocol)||(s=!0)}catch{s=!0}s||r.push({text:n,range:a,activate:(e,t)=>i?i.activate(e,t,a):Se(e,t),hover:(e,t)=>i?.hover?.(e,t,a),leave:(e,t)=>i?.leave?.(e,t,a)})}l=!1,a.hasExtendedAttrs()&&a.extended.urlId?(c=t,s=a.extended.urlId):(c=-1,s=-1)}}t(r)}};xe=d([f(0,w),f(1,D),f(2,ve)],xe);function Se(e,t){if(confirm(`Do you want to navigate to ${t}?
2
2
 
3
3
  WARNING: This link could potentially be dangerous`)){let e=window.open();if(e){try{e.opener=null}catch{}e.location.href=t}else console.warn(`Opening link blocked as opener could not be cleared`)}}var Ce=C(`CharSizeService`),we=C(`CoreBrowserService`),Te=C(`MouseService`),Ee=C(`RenderService`),De=C(`SelectionService`),Oe=C(`CharacterJoinerService`),ke=C(`ThemeService`),Ae=C(`LinkProviderService`),je=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?Le.isErrorNoTelemetry(e)?new Le(e.message+`
4
4
 
@@ -6,7 +6,7 @@
6
6
  <meta name="color-scheme" content="light" />
7
7
  <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; connect-src 'self' http://127.0.0.1:* http://localhost:* http://[::1]:* ws://127.0.0.1:* ws://localhost:* ws://[::1]:*; frame-src http://127.0.0.1:* http://localhost:* http://[::1]:*" />
8
8
  <title>Flavor Code</title>
9
- <script type="module" crossorigin src="./assets/index-DCqIrF1S.js"></script>
9
+ <script type="module" crossorigin src="./assets/index-CjC0Ibiq.js"></script>
10
10
  <link rel="stylesheet" crossorigin href="./assets/index-BWklSoOO.css">
11
11
  </head>
12
12
  <body>
@@ -3,15 +3,15 @@ import { createRequire as createFlavorRequire } from "node:module"; const requir
3
3
  import {
4
4
  formatDoctorReport,
5
5
  runDoctor
6
- } from "./chunk-K7UGGWJV.js";
6
+ } from "./chunk-JQM2L2YM.js";
7
7
  import "./chunk-IU3UBETC.js";
8
8
  import "./chunk-PZ5NKRVA.js";
9
9
  import "./chunk-6F66UXBI.js";
10
10
  import "./chunk-3UX2CGDW.js";
11
11
  import "./chunk-CVP5OUHD.js";
12
12
  import "./chunk-RV3EXUXM.js";
13
- import "./chunk-HGTCIHWA.js";
14
- import "./chunk-6X62CGMA.js";
13
+ import "./chunk-5BDKRA6U.js";
14
+ import "./chunk-ONRY3C2L.js";
15
15
  import "./chunk-EWD7FWTH.js";
16
16
  import "./chunk-ZKKVSR37.js";
17
17
  export {
@@ -24,6 +24,7 @@ export interface LocalHarnessOptions {
24
24
  softLimitFactor?: number;
25
25
  extendIterations?: number;
26
26
  hasActiveProgress?(): boolean;
27
+ beforeModelCall?: AgentLoopOptions["beforeModelCall"];
27
28
  hallucinationGuard?: HallucinationGuard;
28
29
  /** When true, non-destructive tools skip the approval callback. Destructive tools still require confirmation. */
29
30
  loopMode?: boolean;
@@ -9,8 +9,8 @@ import {
9
9
  setProjectProviderConfig,
10
10
  setProjectSkillDisabled,
11
11
  unsetProjectConfigValue
12
- } from "./chunk-HGTCIHWA.js";
13
- import "./chunk-6X62CGMA.js";
12
+ } from "./chunk-5BDKRA6U.js";
13
+ import "./chunk-ONRY3C2L.js";
14
14
  import "./chunk-EWD7FWTH.js";
15
15
  import "./chunk-ZKKVSR37.js";
16
16
  export {
@@ -10,10 +10,10 @@ import {
10
10
  import {
11
11
  loadConfig,
12
12
  setProjectSkillDisabled
13
- } from "./chunk-HGTCIHWA.js";
13
+ } from "./chunk-5BDKRA6U.js";
14
14
  import {
15
15
  SkillNameSchema
16
- } from "./chunk-6X62CGMA.js";
16
+ } from "./chunk-ONRY3C2L.js";
17
17
  import "./chunk-EWD7FWTH.js";
18
18
  import {
19
19
  __toESM
@@ -9,10 +9,10 @@ import {
9
9
  matchesHeadlessAllowlist,
10
10
  runGoalSession,
11
11
  runResumeGoalSession
12
- } from "./chunk-IDJAHEG6.js";
12
+ } from "./chunk-U4XTQ5PU.js";
13
13
  import "./chunk-TIEOVQW6.js";
14
14
  import "./chunk-OKHV7CTB.js";
15
- import "./chunk-K7UGGWJV.js";
15
+ import "./chunk-JQM2L2YM.js";
16
16
  import "./chunk-IU3UBETC.js";
17
17
  import "./chunk-PZ5NKRVA.js";
18
18
  import "./chunk-6F66UXBI.js";
@@ -21,15 +21,15 @@ import "./chunk-7Y64WNBB.js";
21
21
  import "./chunk-CVP5OUHD.js";
22
22
  import "./chunk-3563SW4X.js";
23
23
  import "./chunk-RBAZLFKB.js";
24
- import "./chunk-FAJ6YDZK.js";
24
+ import "./chunk-36IDJRLQ.js";
25
25
  import "./chunk-WLZUAVVU.js";
26
26
  import "./chunk-RV3EXUXM.js";
27
27
  import "./chunk-IQEEFDEE.js";
28
28
  import "./chunk-GTFP2R5I.js";
29
- import "./chunk-HGTCIHWA.js";
30
- import "./chunk-SJUIIHIA.js";
29
+ import "./chunk-5BDKRA6U.js";
30
+ import "./chunk-X6U6BO5D.js";
31
31
  import "./chunk-BDX777JR.js";
32
- import "./chunk-6X62CGMA.js";
32
+ import "./chunk-ONRY3C2L.js";
33
33
  import "./chunk-EWD7FWTH.js";
34
34
  import "./chunk-KRWWCVXA.js";
35
35
  import "./chunk-X442CJJH.js";
@@ -60,6 +60,8 @@ export interface ProductionRuntimeOptions {
60
60
  islandControl?: {
61
61
  focus?(): void | Promise<void>;
62
62
  };
63
+ /** Current desktop task title for the companion island; read on every hook. */
64
+ islandSessionTitle?: (sessionId: string) => string | undefined;
63
65
  /** Explicitly opt into CLI-local collaboration. Omit for print/RPC/eval callers. */
64
66
  collaboration?: {
65
67
  instanceId: string;
package/dist/sdk/index.js CHANGED
@@ -15,10 +15,10 @@ import {
15
15
  WorkspaceCheckpointStore,
16
16
  buildDockerInvocation,
17
17
  createProductionRuntime
18
- } from "../chunk-IDJAHEG6.js";
18
+ } from "../chunk-U4XTQ5PU.js";
19
19
  import "../chunk-TIEOVQW6.js";
20
20
  import "../chunk-OKHV7CTB.js";
21
- import "../chunk-K7UGGWJV.js";
21
+ import "../chunk-JQM2L2YM.js";
22
22
  import "../chunk-IU3UBETC.js";
23
23
  import "../chunk-PZ5NKRVA.js";
24
24
  import "../chunk-6F66UXBI.js";
@@ -27,15 +27,15 @@ import "../chunk-7Y64WNBB.js";
27
27
  import "../chunk-CVP5OUHD.js";
28
28
  import "../chunk-3563SW4X.js";
29
29
  import "../chunk-RBAZLFKB.js";
30
- import "../chunk-FAJ6YDZK.js";
30
+ import "../chunk-36IDJRLQ.js";
31
31
  import "../chunk-WLZUAVVU.js";
32
32
  import "../chunk-RV3EXUXM.js";
33
33
  import "../chunk-IQEEFDEE.js";
34
34
  import "../chunk-GTFP2R5I.js";
35
- import "../chunk-HGTCIHWA.js";
36
- import "../chunk-SJUIIHIA.js";
35
+ import "../chunk-5BDKRA6U.js";
36
+ import "../chunk-X6U6BO5D.js";
37
37
  import "../chunk-BDX777JR.js";
38
- import "../chunk-6X62CGMA.js";
38
+ import "../chunk-ONRY3C2L.js";
39
39
  import "../chunk-EWD7FWTH.js";
40
40
  import "../chunk-KRWWCVXA.js";
41
41
  import "../chunk-X442CJJH.js";
@@ -5,9 +5,9 @@ import {
5
5
  SESSION_VERSION,
6
6
  SessionDocumentSchema,
7
7
  SessionStore
8
- } from "./chunk-SJUIIHIA.js";
8
+ } from "./chunk-X6U6BO5D.js";
9
9
  import "./chunk-BDX777JR.js";
10
- import "./chunk-6X62CGMA.js";
10
+ import "./chunk-ONRY3C2L.js";
11
11
  import "./chunk-EWD7FWTH.js";
12
12
  import "./chunk-ZKKVSR37.js";
13
13
  export {
@@ -1,4 +1,4 @@
1
- export declare const MVP_COMMANDS: readonly ["model", "init", "config", "login", "logout", "permissions", "skills", "plugins", "hooks", "tasks", "finish", "compact", "clear", "paste-image", "help", "exit", "audit", "usage", "doctor", "loop", "goal", "evolve", "mcp", "commit", "review", "explain", "ide", "memory", "remember", "forget", "forget-cold", "checkpoint", "tree", "rewind", "unrevert", "fork", "pals", "chat", "co-work", "tool"];
1
+ export declare const MVP_COMMANDS: readonly ["model", "init", "config", "login", "logout", "permissions", "skills", "plugins", "hooks", "tasks", "finish", "compact", "clear", "paste-image", "help", "exit", "audit", "usage", "doctor", "loop", "goal", "evolve", "mcp", "commit", "review", "explain", "ide", "memory", "remember", "forget", "forget-cold", "global", "checkpoint", "tree", "rewind", "unrevert", "fork", "pals", "chat", "co-work", "tool"];
2
2
  export declare const COMMAND_DESCRIPTIONS: Record<(typeof MVP_COMMANDS)[number], string>;
3
3
  export type PermissionCommandMode = PermissionMode;
4
4
  export type ModelRole = "main" | "subagent";
@@ -14,6 +14,14 @@ export type McpSlashCommand = {
14
14
  action: "enable" | "disable";
15
15
  target: string;
16
16
  };
17
+ export type GlobalSlashCommand = {
18
+ name: "global";
19
+ action: "show";
20
+ } | {
21
+ name: "global";
22
+ action: "remember" | "forget";
23
+ text: string;
24
+ };
17
25
  export type PalsSlashCommand = {
18
26
  name: "pals";
19
27
  action: "list";
@@ -84,7 +92,7 @@ export type SlashCommand = {
84
92
  } | {
85
93
  name: "forget";
86
94
  query: string;
87
- } | {
95
+ } | GlobalSlashCommand | {
88
96
  name: "checkpoint";
89
97
  label?: string;
90
98
  } | {
@@ -95,7 +103,7 @@ export type SlashCommand = {
95
103
  target: string;
96
104
  goal: string;
97
105
  } | CoWorkSlashCommand | {
98
- name: Exclude<(typeof MVP_COMMANDS)[number], "model" | "permissions" | "audit" | "loop" | "goal" | "evolve" | "commit" | "review" | "explain" | "mcp" | "remember" | "forget" | "checkpoint" | "rewind" | "fork" | "pals" | "chat" | "co-work" | "tool">;
106
+ name: Exclude<(typeof MVP_COMMANDS)[number], "model" | "permissions" | "audit" | "loop" | "goal" | "evolve" | "commit" | "review" | "explain" | "mcp" | "remember" | "forget" | "global" | "checkpoint" | "rewind" | "fork" | "pals" | "chat" | "co-work" | "tool">;
99
107
  } | {
100
108
  name: "audit";
101
109
  toolFilter?: string | undefined;
@@ -2,7 +2,7 @@ import type { AgentEvent } from "../agent/types.js";
2
2
  import type { HookBus } from "../hooks/bus.js";
3
3
  import type { PermissionMode } from "../permissions/engine.js";
4
4
  import type { SkillMetadata } from "../skills/registry.js";
5
- import { type McpSlashCommand, type ModelRole } from "./commands.js";
5
+ import { type GlobalSlashCommand, type McpSlashCommand, type ModelRole } from "./commands.js";
6
6
  import type { QuestionBridge } from "../tools/ask-user-question.js";
7
7
  import type { MemoryRestartContinuation } from "../utils/memory-restart.js";
8
8
  import type { MemoryType } from "../memory/types.js";
@@ -156,6 +156,7 @@ export interface SessionServices {
156
156
  unrevert?(): Promise<void>;
157
157
  fork?(nodeId: string): Promise<void>;
158
158
  memory(): Promise<string>;
159
+ global?(command: GlobalSlashCommand): Promise<string>;
159
160
  refreshMemory?(): Promise<void>;
160
161
  remember(type: MemoryType, text: string): Promise<string>;
161
162
  forget(query: string): Promise<string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flavor-code",
3
- "version": "1.4.3-beta.2",
3
+ "version": "1.4.4-beta.2",
4
4
  "author": "YachuanWzh",
5
5
  "type": "module",
6
6
  "publishConfig": {