flavor-code 1.4.4-beta.2 → 1.4.5-beta.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/README.md +43 -3
- package/README.zh-CN.md +43 -3
- package/dist/agent/expert-agents.d.ts +35 -0
- package/dist/agent/expert-generator.d.ts +14 -0
- package/dist/agent/expert-templates.d.ts +26 -0
- package/dist/agent/planner.d.ts +2 -0
- package/dist/{app-C5I2TH7I.js → app-IUPRUKWJ.js} +785 -396
- package/dist/{chunk-IKGT4MDT.js → chunk-4GKKXT5V.js} +1 -0
- package/dist/{chunk-Y7EH4NVO.js → chunk-55YUJKT4.js} +1 -1
- package/dist/{chunk-X6U6BO5D.js → chunk-CI6IHATI.js} +7 -3
- package/dist/{chunk-U4XTQ5PU.js → chunk-G3LKW5SY.js} +4536 -3367
- package/dist/{chunk-5BDKRA6U.js → chunk-MVBRIM53.js} +1 -1
- package/dist/{chunk-36IDJRLQ.js → chunk-SAAIDKTM.js} +46 -9
- package/dist/{chunk-JQM2L2YM.js → chunk-SW7VZDFS.js} +1 -1
- package/dist/{chunk-ONRY3C2L.js → chunk-TZ7PI4NZ.js} +1 -1
- package/dist/{claude-ink-F554I3GJ.js → claude-ink-5X2DRKN6.js} +1 -1
- package/dist/{cli-V3BLZ5UW.js → cli-4NWD3ZN3.js} +66 -14
- package/dist/cli-main.js +19 -19
- package/dist/desktop/main.js +9336 -8125
- package/dist/desktop-renderer/assets/{index-CjC0Ibiq.js → index-CBjfgCRz.js} +3 -3
- package/dist/desktop-renderer/assets/{interactive-terminal-IjIT3Xoa.js → interactive-terminal-x8YYSqF6.js} +1 -1
- package/dist/desktop-renderer/index.html +1 -1
- package/dist/{doctor-SEL32R7M.js → doctor-77UMJ6TK.js} +3 -3
- package/dist/evolution/preferences.d.ts +52 -0
- package/dist/evolve/loader.d.ts +2 -0
- package/dist/evolve/service.d.ts +6 -3
- package/dist/evolve/store.d.ts +55 -2
- package/dist/evolve/verification.d.ts +30 -0
- package/dist/harness/local.d.ts +4 -2
- package/dist/{load-RHWXNUCS.js → load-JINXGR3N.js} +2 -2
- package/dist/{manager-IYBNNKUP.js → manager-UTQT466W.js} +2 -2
- package/dist/memory/coordinator.d.ts +1 -1
- package/dist/memory/review.d.ts +13 -0
- package/dist/memory/store.d.ts +1 -0
- package/dist/memory/types.d.ts +2 -0
- package/dist/{production-TD7UWWXW.js → production-J7ZWR7VL.js} +6 -6
- package/dist/sdk/index.js +6 -6
- package/dist/session/store.d.ts +1 -0
- package/dist/{store-MZZERW7K.js → store-Y4V5TLXE.js} +2 -2
- package/dist/ui/commands.d.ts +21 -2
- package/dist/ui/session.d.ts +8 -0
- package/package.json +1 -1
- package//346/212/200/346/234/257/346/226/271/346/241/210/346/212/245/345/221/212.md +97 -6
|
@@ -1,4 +1,4 @@
|
|
|
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}?
|
|
1
|
+
import{i as e,n as t,r as n,t as r}from"./index-CBjfgCRz.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-
|
|
9
|
+
<script type="module" crossorigin src="./assets/index-CBjfgCRz.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-
|
|
6
|
+
} from "./chunk-SW7VZDFS.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-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-MVBRIM53.js";
|
|
14
|
+
import "./chunk-TZ7PI4NZ.js";
|
|
15
15
|
import "./chunk-EWD7FWTH.js";
|
|
16
16
|
import "./chunk-ZKKVSR37.js";
|
|
17
17
|
export {
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { ScoredMemoryCandidate } from "../memory/types.js";
|
|
3
|
+
declare const PreferenceSchema: z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
content: z.ZodString;
|
|
6
|
+
type: z.ZodEnum<{
|
|
7
|
+
feedback: "feedback";
|
|
8
|
+
user: "user";
|
|
9
|
+
}>;
|
|
10
|
+
source: z.ZodEnum<{
|
|
11
|
+
explicit: "explicit";
|
|
12
|
+
inferred: "inferred";
|
|
13
|
+
}>;
|
|
14
|
+
status: z.ZodEnum<{
|
|
15
|
+
active: "active";
|
|
16
|
+
canary: "canary";
|
|
17
|
+
dropped: "dropped";
|
|
18
|
+
proposed: "proposed";
|
|
19
|
+
suspended: "suspended";
|
|
20
|
+
}>;
|
|
21
|
+
topicKey: z.ZodString;
|
|
22
|
+
keywords: z.ZodArray<z.ZodString>;
|
|
23
|
+
evidenceTasks: z.ZodArray<z.ZodString>;
|
|
24
|
+
exposures: z.ZodArray<z.ZodString>;
|
|
25
|
+
positiveTasks: z.ZodArray<z.ZodString>;
|
|
26
|
+
negativeTasks: z.ZodArray<z.ZodString>;
|
|
27
|
+
createdAt: z.ZodString;
|
|
28
|
+
updatedAt: z.ZodString;
|
|
29
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
30
|
+
}, z.core.$strict>;
|
|
31
|
+
export type EvolvedPreference = z.infer<typeof PreferenceSchema>;
|
|
32
|
+
export declare class PreferenceEvolution {
|
|
33
|
+
#private;
|
|
34
|
+
readonly path: string;
|
|
35
|
+
constructor(workspace: string, events?: {
|
|
36
|
+
onExposure?: (taskId: string, ids: readonly string[]) => Promise<void>;
|
|
37
|
+
onFeedback?: (taskId: string, ids: readonly string[], sentiment: "positive" | "negative") => Promise<void>;
|
|
38
|
+
});
|
|
39
|
+
list(): Promise<EvolvedPreference[]>;
|
|
40
|
+
propose(candidate: Pick<ScoredMemoryCandidate, "type" | "content" | "topicKey" | "keywords">, taskId: string, explicit: boolean, userMessages?: readonly string[]): Promise<{
|
|
41
|
+
id: string;
|
|
42
|
+
status: EvolvedPreference["status"];
|
|
43
|
+
} | undefined>;
|
|
44
|
+
/** Explicit user wording is authoritative; a model never has to infer this intent. */
|
|
45
|
+
observeExplicitPrompt(prompt: string, taskId: string): Promise<void>;
|
|
46
|
+
contextForTask(prompt: string, taskId: string): Promise<string | undefined>;
|
|
47
|
+
/** Attribute direct feedback only when one preference was exposed or its ID is named. */
|
|
48
|
+
observeFeedback(prompt: string): Promise<string | undefined>;
|
|
49
|
+
drop(id: string, reason?: string): Promise<boolean>;
|
|
50
|
+
restore(id: string): Promise<boolean>;
|
|
51
|
+
}
|
|
52
|
+
export {};
|
package/dist/evolve/loader.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export interface FixPluginVerifyReport {
|
|
|
11
11
|
provided: string[];
|
|
12
12
|
tools: string[];
|
|
13
13
|
commands: string[];
|
|
14
|
+
registrations: number;
|
|
14
15
|
error?: string;
|
|
15
16
|
}
|
|
16
17
|
/** Verify a plugin in an isolated Worker sandbox. The real host is untouched. */
|
|
@@ -19,3 +20,4 @@ export declare function verifyFixPlugin(workspace: string, name: string): Promis
|
|
|
19
20
|
export declare function snapshotFixPlugin(workspace: string, name: string): Promise<string>;
|
|
20
21
|
/** Restore the latest good snapshot of a plugin dir. */
|
|
21
22
|
export declare function revertFixPlugin(workspace: string, name: string): Promise<string>;
|
|
23
|
+
export declare function restoreFixPluginSnapshot(workspace: string, name: string, snapshot: string): Promise<void>;
|
package/dist/evolve/service.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { EvolveStore, type EvolveSuggestion } from "./store.js";
|
|
|
6
6
|
export interface EvolveServiceOptions {
|
|
7
7
|
workspace: string;
|
|
8
8
|
hooks: HookBus;
|
|
9
|
+
store?: EvolveStore;
|
|
9
10
|
/** Real host plugin loader; required only for the reload subcommand. */
|
|
10
11
|
pluginHost?: PluginHost;
|
|
11
12
|
config?: {
|
|
@@ -22,13 +23,15 @@ export interface EvolveServiceOptions {
|
|
|
22
23
|
}
|
|
23
24
|
export interface EvolveService {
|
|
24
25
|
readonly store: EvolveStore;
|
|
26
|
+
/** Load persisted suggestions and guardrails before the first model call. */
|
|
27
|
+
initialize(): Promise<void>;
|
|
25
28
|
suggestions(): Promise<EvolveSuggestion[]>;
|
|
26
29
|
/** Synchronous system-prompt section (cached after every capture). */
|
|
27
30
|
promptSection(): string | undefined;
|
|
28
|
-
/** Reset per-run counters
|
|
31
|
+
/** Reset per-run counters at the start of a foreground task or loop worker. */
|
|
29
32
|
beginRun(): void;
|
|
30
|
-
/** Append a reflection
|
|
31
|
-
endRun(reason?: string): Promise<void>;
|
|
33
|
+
/** Append a reflection and reset counters; emit LoopEnd only for /loop. */
|
|
34
|
+
endRun(reason?: string, emitLoopEnd?: boolean, taskId?: string): Promise<void>;
|
|
32
35
|
handleCommand(args: readonly string[]): Promise<string>;
|
|
33
36
|
toolDefinition(): ToolDefinition<unknown>;
|
|
34
37
|
dispose(): void;
|
package/dist/evolve/store.d.ts
CHANGED
|
@@ -23,7 +23,9 @@ export interface EvolveSuggestion {
|
|
|
23
23
|
export interface ToolTrend {
|
|
24
24
|
/** Failure count of this tool in the run (per-run, not cumulative). */
|
|
25
25
|
failures: number;
|
|
26
|
-
/**
|
|
26
|
+
/** Number of invocations; absent on reflections written before 1.4.5. */
|
|
27
|
+
calls?: number;
|
|
28
|
+
/** Failure-rate change in percentage points when both runs invoked the tool. */
|
|
27
29
|
delta: number;
|
|
28
30
|
}
|
|
29
31
|
export interface EvolveReflectionInput {
|
|
@@ -41,19 +43,61 @@ export interface EvolveReflection extends EvolveReflectionInput {
|
|
|
41
43
|
at: string;
|
|
42
44
|
perTool: Record<string, ToolTrend>;
|
|
43
45
|
}
|
|
46
|
+
/** Small, local events; no prompt, tool input, or model output is copied here. */
|
|
47
|
+
export type EvolveOutcomeInput = {
|
|
48
|
+
kind: "candidate_exposed";
|
|
49
|
+
taskId: string;
|
|
50
|
+
candidateIds: string[];
|
|
51
|
+
} | {
|
|
52
|
+
kind: "candidate_feedback";
|
|
53
|
+
taskId: string;
|
|
54
|
+
candidateIds: string[];
|
|
55
|
+
sentiment: "positive" | "negative";
|
|
56
|
+
} | {
|
|
57
|
+
kind: "task_finished";
|
|
58
|
+
taskId: string;
|
|
59
|
+
outcome: string;
|
|
60
|
+
modelCalls: number;
|
|
61
|
+
toolCalls: number;
|
|
62
|
+
toolErrors: number;
|
|
63
|
+
};
|
|
64
|
+
export type EvolveOutcomeEvent = EvolveOutcomeInput & {
|
|
65
|
+
at: string;
|
|
66
|
+
};
|
|
67
|
+
export interface EvolveComparison {
|
|
68
|
+
at: string;
|
|
69
|
+
caseName: string;
|
|
70
|
+
baseline: {
|
|
71
|
+
passed: boolean;
|
|
72
|
+
durationMs: number;
|
|
73
|
+
tokens: number;
|
|
74
|
+
checksPassed: number;
|
|
75
|
+
checksTotal: number;
|
|
76
|
+
};
|
|
77
|
+
candidate: {
|
|
78
|
+
passed: boolean;
|
|
79
|
+
durationMs: number;
|
|
80
|
+
tokens: number;
|
|
81
|
+
checksPassed: number;
|
|
82
|
+
checksTotal: number;
|
|
83
|
+
};
|
|
84
|
+
verdict: "improved" | "regressed" | "unchanged";
|
|
85
|
+
}
|
|
44
86
|
export interface EvolveRule {
|
|
45
87
|
id: string;
|
|
46
88
|
text: string;
|
|
47
89
|
addedAt: string;
|
|
48
90
|
/** Signal id that motivated this rule, when it came from a suggestion. */
|
|
49
91
|
sourceId?: string;
|
|
92
|
+
/** Older records without a status are active. */
|
|
93
|
+
status?: "proposed" | "active";
|
|
50
94
|
}
|
|
51
95
|
export interface EvolveStoreOptions {
|
|
52
96
|
workspace: string;
|
|
53
97
|
maxSignals?: number;
|
|
54
98
|
maxRules?: number;
|
|
55
99
|
}
|
|
56
|
-
/**
|
|
100
|
+
/** Keep only a safe failure shape; raw stderr can contain paths and credentials. */
|
|
57
101
|
export declare function normalizeError(message: unknown): string;
|
|
58
102
|
/** Stable id for a (tool, errorCode, error) triple, so repeated failures coalesce. */
|
|
59
103
|
export declare function fingerprint(tool: string, errorCode: string | undefined, error: unknown): string;
|
|
@@ -64,6 +108,8 @@ export declare class EvolveStore {
|
|
|
64
108
|
readonly dir: string;
|
|
65
109
|
readonly signalsFile: string;
|
|
66
110
|
readonly reflectionsFile: string;
|
|
111
|
+
readonly outcomeEventsFile: string;
|
|
112
|
+
readonly comparisonsFile: string;
|
|
67
113
|
readonly doneFile: string;
|
|
68
114
|
readonly verifiedFile: string;
|
|
69
115
|
readonly rulesFile: string;
|
|
@@ -87,6 +133,10 @@ export declare class EvolveStore {
|
|
|
87
133
|
clearSignals(): Promise<void>;
|
|
88
134
|
appendReflection(input: EvolveReflectionInput): Promise<EvolveReflection>;
|
|
89
135
|
reflections(limit?: number): Promise<EvolveReflection[]>;
|
|
136
|
+
appendOutcomeEvent(event: EvolveOutcomeInput): Promise<EvolveOutcomeEvent>;
|
|
137
|
+
outcomeEvents(limit?: number): Promise<EvolveOutcomeEvent[]>;
|
|
138
|
+
appendComparison(input: Omit<EvolveComparison, "at">): Promise<EvolveComparison>;
|
|
139
|
+
comparisons(limit?: number): Promise<EvolveComparison[]>;
|
|
90
140
|
/** Aggregate open suggestions from repeated failure signals. */
|
|
91
141
|
openSuggestions(input?: {
|
|
92
142
|
threshold?: number;
|
|
@@ -107,10 +157,13 @@ export declare class EvolveStore {
|
|
|
107
157
|
addRule(input: {
|
|
108
158
|
text: string;
|
|
109
159
|
sourceId?: string;
|
|
160
|
+
status?: "proposed" | "active";
|
|
110
161
|
}): Promise<{
|
|
111
162
|
added: boolean;
|
|
163
|
+
activated?: boolean;
|
|
112
164
|
rule: EvolveRule;
|
|
113
165
|
}>;
|
|
166
|
+
activateRule(id: string): Promise<boolean>;
|
|
114
167
|
removeRule(id: string): Promise<{
|
|
115
168
|
removed: boolean;
|
|
116
169
|
}>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
declare const Ledger: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
3
|
+
digest: z.ZodString;
|
|
4
|
+
verifiedAt: z.ZodString;
|
|
5
|
+
testedAt: z.ZodOptional<z.ZodString>;
|
|
6
|
+
testCommand: z.ZodOptional<z.ZodString>;
|
|
7
|
+
activeDigest: z.ZodOptional<z.ZodString>;
|
|
8
|
+
goodSnapshot: z.ZodOptional<z.ZodString>;
|
|
9
|
+
}, z.core.$strict>>;
|
|
10
|
+
type Ledger = z.infer<typeof Ledger>;
|
|
11
|
+
export declare function assertFixPluginName(name: string): void;
|
|
12
|
+
/** Hash the exact bytes that will be loaded; symlinks cannot escape the plugin root. */
|
|
13
|
+
export declare function hashFixPlugin(workspace: string, name: string): Promise<string>;
|
|
14
|
+
/** A rollback snapshot must still match the version that was approved. */
|
|
15
|
+
export declare function hashFixPluginSnapshot(workspace: string, name: string, snapshot: string): Promise<string>;
|
|
16
|
+
export declare class EvolveVerificationStore {
|
|
17
|
+
#private;
|
|
18
|
+
readonly path: string;
|
|
19
|
+
constructor(workspace: string);
|
|
20
|
+
list(): Promise<Ledger>;
|
|
21
|
+
markVerified(name: string, digest: string): Promise<void>;
|
|
22
|
+
markTested(name: string, digest: string, command: string): Promise<void>;
|
|
23
|
+
markActive(name: string, digest: string, snapshot: string): Promise<void>;
|
|
24
|
+
eligible(name: string, digest: string): Promise<boolean>;
|
|
25
|
+
approvedForStartup(name: string, digest: string): Promise<boolean>;
|
|
26
|
+
goodSnapshot(name: string): Promise<string | undefined>;
|
|
27
|
+
}
|
|
28
|
+
/** Every unapproved fix plugin is disabled at startup; regular plugins are untouched. */
|
|
29
|
+
export declare function unverifiedFixPlugins(workspace: string, store?: EvolveVerificationStore): Promise<string[]>;
|
|
30
|
+
export {};
|
package/dist/harness/local.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AgentLoop, type AgentLoopOptions } from "../agent/loop.js";
|
|
2
2
|
import type { TaskNode } from "../agent/planner.js";
|
|
3
|
+
import type { ExpertAgent } from "../agent/expert-agents.js";
|
|
3
4
|
import type { HallucinationGuard } from "../hallucination/guard.js";
|
|
4
5
|
import type { PermissionMode, PermissionProfile } from "../permissions/engine.js";
|
|
5
6
|
import type { CompiledPermissionPolicy } from "../permissions/policy.js";
|
|
@@ -57,8 +58,9 @@ export declare class LocalHarness {
|
|
|
57
58
|
setPermissionMode(mode: PermissionMode): void;
|
|
58
59
|
setPermissionProfile(profile: PermissionProfile): void;
|
|
59
60
|
replaceMainTools(definitions: readonly ToolDefinition<unknown>[]): void;
|
|
60
|
-
createSubagent(task: TaskNode, parentContext?: ContextManager): SubagentHarness;
|
|
61
|
-
runSubagent<T>(task: TaskNode, execute: (harness: SubagentHarness, signal: AbortSignal) => Promise<T>, signal?: AbortSignal, parentContext?: ContextManager): Promise<T>;
|
|
61
|
+
createSubagent(task: TaskNode, parentContext?: ContextManager, expert?: ExpertAgent): SubagentHarness;
|
|
62
|
+
runSubagent<T>(task: TaskNode, execute: (harness: SubagentHarness, signal: AbortSignal) => Promise<T>, signal?: AbortSignal, parentContext?: ContextManager, expert?: ExpertAgent): Promise<T>;
|
|
62
63
|
dispose(): void;
|
|
63
64
|
[Symbol.asyncDispose](): Promise<void>;
|
|
64
65
|
}
|
|
66
|
+
export declare function isExpertReadTool(tool: ToolDefinition<unknown>): boolean;
|
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
setProjectProviderConfig,
|
|
10
10
|
setProjectSkillDisabled,
|
|
11
11
|
unsetProjectConfigValue
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-MVBRIM53.js";
|
|
13
|
+
import "./chunk-TZ7PI4NZ.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-
|
|
13
|
+
} from "./chunk-MVBRIM53.js";
|
|
14
14
|
import {
|
|
15
15
|
SkillNameSchema
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-TZ7PI4NZ.js";
|
|
17
17
|
import "./chunk-EWD7FWTH.js";
|
|
18
18
|
import {
|
|
19
19
|
__toESM
|
|
@@ -2,7 +2,7 @@ import { type ModelMessage } from "../models/types.js";
|
|
|
2
2
|
import type { ScoredMemoryCandidate } from "./types.js";
|
|
3
3
|
export interface MemoryCoordinatorOptions {
|
|
4
4
|
review(taskId: string, candidates: readonly ScoredMemoryCandidate[]): void | Promise<void>;
|
|
5
|
-
remember(taskId: string, candidates: readonly ScoredMemoryCandidate[]): number | Promise<number>;
|
|
5
|
+
remember(taskId: string, candidates: readonly ScoredMemoryCandidate[], explicit?: boolean, userMessages?: readonly string[]): number | Promise<number>;
|
|
6
6
|
generate(prompt: string, signal: AbortSignal): Promise<string>;
|
|
7
7
|
minChars: number;
|
|
8
8
|
maxEntryChars: number;
|
package/dist/memory/review.d.ts
CHANGED
|
@@ -6,7 +6,10 @@ export interface MemoryReviewItem extends MemoryCandidate {
|
|
|
6
6
|
topicKey?: string;
|
|
7
7
|
keywords?: string[];
|
|
8
8
|
scores?: MemoryScores;
|
|
9
|
+
evidence?: string;
|
|
10
|
+
createdAt?: string;
|
|
9
11
|
}
|
|
12
|
+
export declare const MAX_PENDING_MEMORY_REVIEWS = 20;
|
|
10
13
|
export interface MemoryReviewBridgeOptions {
|
|
11
14
|
remember(candidate: MemoryReviewItem): Promise<unknown>;
|
|
12
15
|
onChange?(): void;
|
|
@@ -20,12 +23,22 @@ export interface MemoryReviewBridgeOptions {
|
|
|
20
23
|
* not an explicit user dismissal and never triggers {@link onDismiss}.
|
|
21
24
|
*/
|
|
22
25
|
autoDismissSeconds?: number;
|
|
26
|
+
/** Persist pending reviews across turns and process restarts. */
|
|
27
|
+
storagePath?: string;
|
|
23
28
|
}
|
|
24
29
|
/** Holds model-generated memory outside the durable store until the user accepts it. */
|
|
25
30
|
export declare class MemoryReviewBridge {
|
|
26
31
|
#private;
|
|
27
32
|
readonly autoDismissSeconds: number;
|
|
28
33
|
constructor(options: MemoryReviewBridgeOptions);
|
|
34
|
+
initialize(): Promise<void>;
|
|
35
|
+
flush(): Promise<void>;
|
|
36
|
+
get stats(): Readonly<{
|
|
37
|
+
offered: number;
|
|
38
|
+
accepted: number;
|
|
39
|
+
dismissed: number;
|
|
40
|
+
pending: number;
|
|
41
|
+
}>;
|
|
29
42
|
get pending(): readonly MemoryReviewItem[];
|
|
30
43
|
offer(candidates: readonly MemoryCandidate[]): number;
|
|
31
44
|
offer(taskId: string, candidates: readonly ScoredMemoryCandidate[]): number;
|
package/dist/memory/store.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ export declare class MemoryStore {
|
|
|
31
31
|
rememberForTask(taskId: string, candidate: ScoredMemoryCandidate, now?: Date): Promise<{
|
|
32
32
|
entry: MemoryEntry;
|
|
33
33
|
added: boolean;
|
|
34
|
+
conflict?: MemoryReference;
|
|
34
35
|
}>;
|
|
35
36
|
rememberMany(candidates: readonly MemoryCandidate[]): Promise<{
|
|
36
37
|
added: number;
|
package/dist/memory/types.d.ts
CHANGED
|
@@ -18,6 +18,8 @@ export interface ScoredMemoryCandidate extends MemoryCandidate {
|
|
|
18
18
|
topicKey: string;
|
|
19
19
|
keywords: string[];
|
|
20
20
|
scores: MemoryScores;
|
|
21
|
+
/** Exact quote from a user message, when one supports the candidate. */
|
|
22
|
+
evidence?: string;
|
|
21
23
|
}
|
|
22
24
|
export interface MemoryReference {
|
|
23
25
|
id: string;
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
matchesHeadlessAllowlist,
|
|
10
10
|
runGoalSession,
|
|
11
11
|
runResumeGoalSession
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-G3LKW5SY.js";
|
|
13
13
|
import "./chunk-TIEOVQW6.js";
|
|
14
14
|
import "./chunk-OKHV7CTB.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-SW7VZDFS.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-
|
|
24
|
+
import "./chunk-SAAIDKTM.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-
|
|
30
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-MVBRIM53.js";
|
|
30
|
+
import "./chunk-CI6IHATI.js";
|
|
31
31
|
import "./chunk-BDX777JR.js";
|
|
32
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-TZ7PI4NZ.js";
|
|
33
33
|
import "./chunk-EWD7FWTH.js";
|
|
34
34
|
import "./chunk-KRWWCVXA.js";
|
|
35
35
|
import "./chunk-X442CJJH.js";
|
package/dist/sdk/index.js
CHANGED
|
@@ -15,10 +15,10 @@ import {
|
|
|
15
15
|
WorkspaceCheckpointStore,
|
|
16
16
|
buildDockerInvocation,
|
|
17
17
|
createProductionRuntime
|
|
18
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-G3LKW5SY.js";
|
|
19
19
|
import "../chunk-TIEOVQW6.js";
|
|
20
20
|
import "../chunk-OKHV7CTB.js";
|
|
21
|
-
import "../chunk-
|
|
21
|
+
import "../chunk-SW7VZDFS.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-
|
|
30
|
+
import "../chunk-SAAIDKTM.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-
|
|
36
|
-
import "../chunk-
|
|
35
|
+
import "../chunk-MVBRIM53.js";
|
|
36
|
+
import "../chunk-CI6IHATI.js";
|
|
37
37
|
import "../chunk-BDX777JR.js";
|
|
38
|
-
import "../chunk-
|
|
38
|
+
import "../chunk-TZ7PI4NZ.js";
|
|
39
39
|
import "../chunk-EWD7FWTH.js";
|
|
40
40
|
import "../chunk-KRWWCVXA.js";
|
|
41
41
|
import "../chunk-X442CJJH.js";
|
package/dist/session/store.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ export declare const SessionDocumentSchema: z.ZodObject<{
|
|
|
32
32
|
nodes: z.ZodArray<z.ZodObject<{
|
|
33
33
|
id: z.ZodString;
|
|
34
34
|
description: z.ZodString;
|
|
35
|
+
agent: z.ZodOptional<z.ZodString>;
|
|
35
36
|
dependencies: z.ZodArray<z.ZodString>;
|
|
36
37
|
expectedOutputs: z.ZodArray<z.ZodString>;
|
|
37
38
|
verification: z.ZodArray<z.ZodString>;
|
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
SESSION_VERSION,
|
|
6
6
|
SessionDocumentSchema,
|
|
7
7
|
SessionStore
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-CI6IHATI.js";
|
|
9
9
|
import "./chunk-BDX777JR.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-TZ7PI4NZ.js";
|
|
11
11
|
import "./chunk-EWD7FWTH.js";
|
|
12
12
|
import "./chunk-ZKKVSR37.js";
|
|
13
13
|
export {
|
package/dist/ui/commands.d.ts
CHANGED
|
@@ -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", "global", "checkpoint", "tree", "rewind", "unrevert", "fork", "pals", "chat", "co-work", "tool"];
|
|
1
|
+
export declare const MVP_COMMANDS: readonly ["model", "init", "config", "login", "logout", "permissions", "skills", "agent", "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";
|
|
@@ -65,6 +65,24 @@ export type SlashCommand = {
|
|
|
65
65
|
name: "skill";
|
|
66
66
|
skill: string;
|
|
67
67
|
prompt: string;
|
|
68
|
+
} | {
|
|
69
|
+
name: "agent";
|
|
70
|
+
action: "list";
|
|
71
|
+
} | {
|
|
72
|
+
name: "agent";
|
|
73
|
+
action: "templates";
|
|
74
|
+
} | {
|
|
75
|
+
name: "agent";
|
|
76
|
+
action: "create";
|
|
77
|
+
agent: string;
|
|
78
|
+
template: ExpertAgentCreationKind;
|
|
79
|
+
description?: string;
|
|
80
|
+
readOnly?: boolean;
|
|
81
|
+
} | {
|
|
82
|
+
name: "agent";
|
|
83
|
+
action: "run";
|
|
84
|
+
agent: string;
|
|
85
|
+
prompt: string;
|
|
68
86
|
} | {
|
|
69
87
|
name: "managed-tool";
|
|
70
88
|
tool: string;
|
|
@@ -103,7 +121,7 @@ export type SlashCommand = {
|
|
|
103
121
|
target: string;
|
|
104
122
|
goal: string;
|
|
105
123
|
} | CoWorkSlashCommand | {
|
|
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">;
|
|
124
|
+
name: Exclude<(typeof MVP_COMMANDS)[number], "model" | "permissions" | "agent" | "audit" | "loop" | "goal" | "evolve" | "commit" | "review" | "explain" | "mcp" | "remember" | "forget" | "global" | "checkpoint" | "rewind" | "fork" | "pals" | "chat" | "co-work" | "tool">;
|
|
107
125
|
} | {
|
|
108
126
|
name: "audit";
|
|
109
127
|
toolFilter?: string | undefined;
|
|
@@ -118,3 +136,4 @@ export type SlashCommand = {
|
|
|
118
136
|
export declare function parseSlashCommand(input: string, dynamicCommands?: readonly string[], skillCommands?: readonly string[], managedTools?: readonly string[]): SlashCommand | null;
|
|
119
137
|
import { type PermissionMode } from "../config/schema.js";
|
|
120
138
|
import { type MemoryType } from "../memory/types.js";
|
|
139
|
+
import { type ExpertAgentCreationKind } from "../agent/expert-templates.js";
|
package/dist/ui/session.d.ts
CHANGED
|
@@ -2,6 +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 ExpertAgentCreationKind } from "../agent/expert-templates.js";
|
|
5
6
|
import { type GlobalSlashCommand, type McpSlashCommand, type ModelRole } from "./commands.js";
|
|
6
7
|
import type { QuestionBridge } from "../tools/ask-user-question.js";
|
|
7
8
|
import type { MemoryRestartContinuation } from "../utils/memory-restart.js";
|
|
@@ -114,6 +115,13 @@ export interface SessionServices {
|
|
|
114
115
|
additionalContext?: string;
|
|
115
116
|
}): AsyncIterable<AgentEvent>;
|
|
116
117
|
runSkill(skill: string, prompt: string, signal: AbortSignal): AsyncIterable<AgentEvent>;
|
|
118
|
+
agents?(): Promise<readonly unknown[]>;
|
|
119
|
+
createAgent?(name: string, template: ExpertAgentCreationKind, description?: string, readOnly?: boolean, signal?: AbortSignal): Promise<{
|
|
120
|
+
name: string;
|
|
121
|
+
path: string;
|
|
122
|
+
permission: string;
|
|
123
|
+
}>;
|
|
124
|
+
runAgent?(name: string, prompt: string, signal: AbortSignal): AsyncIterable<AgentEvent>;
|
|
117
125
|
runLoop(goal: string, signal: AbortSignal): AsyncIterable<AgentEvent>;
|
|
118
126
|
runGoal(goal: string, signal: AbortSignal): AsyncIterable<AgentEvent>;
|
|
119
127
|
/** Resume a /loop interrupted by a heap rotation, keyed by its persisted id. */
|