remote-codex 0.11.0 → 0.11.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/apps/supervisor-api/dist/chunk-6M32PPHZ.js +24507 -0
- package/apps/supervisor-api/dist/chunk-7AA2MFXK.js +24499 -0
- package/apps/supervisor-api/dist/chunk-HKBFCPHH.js +24511 -0
- package/apps/supervisor-api/dist/index.js +1003 -198
- package/apps/supervisor-api/dist/worker-index.d.ts +2 -0
- package/apps/supervisor-api/dist/worker-index.js +33 -0
- package/apps/supervisor-web/dist/assets/{highlighted-body-OFNGDK62-ChrwAL9u.js → highlighted-body-OFNGDK62-p31aS0f0.js} +1 -1
- package/apps/supervisor-web/dist/assets/index-BiuFei_K.css +32 -0
- package/apps/supervisor-web/dist/assets/index-D1R9CUnx.js +2161 -0
- package/apps/supervisor-web/dist/assets/{xterm-D4sevve4.js → xterm-D92BViLH.js} +1 -1
- package/apps/supervisor-web/dist/index.html +2 -2
- package/package.json +1 -1
- package/packages/agent-runtime/src/model-pricing.ts +16 -3
- package/packages/claude/src/historyItems.ts +41 -5
- package/packages/claude/src/runtimeAdapter.test.ts +22 -0
- package/packages/codex/src/historyItems.test.ts +27 -0
- package/packages/codex/src/historyItems.ts +39 -2
- package/packages/codex/src/modelPricing.test.ts +51 -0
- package/packages/opencode/src/runtimeAdapter.test.ts +89 -0
- package/packages/opencode/src/runtimeAdapter.ts +8 -4
- package/packages/shared/src/index.ts +70 -0
- package/apps/supervisor-web/dist/assets/index-DHf2HOXx.js +0 -381
- package/apps/supervisor-web/dist/assets/index-DpWxXCgt.css +0 -32
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as Ce}from"./index-
|
|
1
|
+
import{g as Ce}from"./index-D1R9CUnx.js";function be(se,le){for(var ee=0;ee<le.length;ee++){const J=le[ee];if(typeof J!="string"&&!Array.isArray(J)){for(const V in J)if(V!=="default"&&!(V in se)){const te=Object.getOwnPropertyDescriptor(J,V);te&&Object.defineProperty(se,V,te.get?te:{enumerable:!0,get:()=>J[V]})}}}return Object.freeze(Object.defineProperty(se,Symbol.toStringTag,{value:"Module"}))}var ve={exports:{}},ge;function ye(){return ge||(ge=1,(function(se,le){(function(ee,J){se.exports=J()})(self,(()=>(()=>{var ee={4567:function(I,r,a){var c=this&&this.__decorate||function(i,o,l,v){var m,h=arguments.length,g=h<3?o:v===null?v=Object.getOwnPropertyDescriptor(o,l):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(i,o,l,v);else for(var b=i.length-1;b>=0;b--)(m=i[b])&&(g=(h<3?m(g):h>3?m(o,l,g):m(o,l))||g);return h>3&&g&&Object.defineProperty(o,l,g),g},_=this&&this.__param||function(i,o){return function(l,v){o(l,v,i)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccessibilityManager=void 0;const n=a(9042),d=a(6114),f=a(9924),p=a(844),u=a(5596),e=a(4725),s=a(3656);let t=r.AccessibilityManager=class extends p.Disposable{constructor(i,o){super(),this._terminal=i,this._renderService=o,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=document.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=document.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let l=0;l<this._terminal.rows;l++)this._rowElements[l]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[l]);if(this._topBoundaryFocusListener=l=>this._handleBoundaryFocus(l,0),this._bottomBoundaryFocusListener=l=>this._handleBoundaryFocus(l,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=document.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new f.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((l=>this._handleResize(l.rows)))),this.register(this._terminal.onRender((l=>this._refreshRows(l.start,l.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((l=>this._handleChar(l)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
2
2
|
`)))),this.register(this._terminal.onA11yTab((l=>this._handleTab(l)))),this.register(this._terminal.onKey((l=>this._handleKey(l.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this._screenDprMonitor=new u.ScreenDprMonitor(window),this.register(this._screenDprMonitor),this._screenDprMonitor.setListener((()=>this._refreshRowsDimensions())),this.register((0,s.addDisposableDomListener)(window,"resize",(()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,p.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(i){for(let o=0;o<i;o++)this._handleChar(" ")}_handleChar(i){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==i&&(this._charsToAnnounce+=i):this._charsToAnnounce+=i,i===`
|
|
3
3
|
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=n.tooMuchOutput)),d.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout((()=>{this._accessibilityContainer.appendChild(this._liveRegion)}),0))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0,d.isMac&&this._liveRegion.remove()}_handleKey(i){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(i)||this._charsToConsume.push(i)}_refreshRows(i,o){this._liveRegionDebouncer.refresh(i,o,this._terminal.rows)}_renderRows(i,o){const l=this._terminal.buffer,v=l.lines.length.toString();for(let m=i;m<=o;m++){const h=l.translateBufferLineToString(l.ydisp+m,!0),g=(l.ydisp+m+1).toString(),b=this._rowElements[m];b&&(h.length===0?b.innerText=" ":b.textContent=h,b.setAttribute("aria-posinset",g),b.setAttribute("aria-setsize",v))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(i,o){const l=i.target,v=this._rowElements[o===0?1:this._rowElements.length-2];if(l.getAttribute("aria-posinset")===(o===0?"1":`${this._terminal.buffer.lines.length}`)||i.relatedTarget!==v)return;let m,h;if(o===0?(m=l,h=this._rowElements.pop(),this._rowContainer.removeChild(h)):(m=this._rowElements.shift(),h=l,this._rowContainer.removeChild(m)),m.removeEventListener("focus",this._topBoundaryFocusListener),h.removeEventListener("focus",this._bottomBoundaryFocusListener),o===0){const g=this._createAccessibilityTreeNode();this._rowElements.unshift(g),this._rowContainer.insertAdjacentElement("afterbegin",g)}else{const g=this._createAccessibilityTreeNode();this._rowElements.push(g),this._rowContainer.appendChild(g)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(o===0?-1:1),this._rowElements[o===0?1:this._rowElements.length-2].focus(),i.preventDefault(),i.stopImmediatePropagation()}_handleResize(i){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let o=this._rowContainer.children.length;o<this._terminal.rows;o++)this._rowElements[o]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[o]);for(;this._rowElements.length>i;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const i=document.createElement("div");return i.setAttribute("role","listitem"),i.tabIndex=-1,this._refreshRowDimensions(i),i}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let i=0;i<this._terminal.rows;i++)this._refreshRowDimensions(this._rowElements[i])}}_refreshRowDimensions(i){i.style.height=`${this._renderService.dimensions.css.cell.height}px`}};r.AccessibilityManager=t=c([_(1,e.IRenderService)],t)},3614:(I,r)=>{function a(d){return d.replace(/\r?\n/g,"\r")}function c(d,f){return f?"\x1B[200~"+d+"\x1B[201~":d}function _(d,f,p,u){d=c(d=a(d),p.decPrivateModes.bracketedPasteMode&&u.rawOptions.ignoreBracketedPasteMode!==!0),p.triggerDataEvent(d,!0),f.value=""}function n(d,f,p){const u=p.getBoundingClientRect(),e=d.clientX-u.left-10,s=d.clientY-u.top-10;f.style.width="20px",f.style.height="20px",f.style.left=`${e}px`,f.style.top=`${s}px`,f.style.zIndex="1000",f.focus()}Object.defineProperty(r,"__esModule",{value:!0}),r.rightClickHandler=r.moveTextAreaUnderMouseCursor=r.paste=r.handlePasteEvent=r.copyHandler=r.bracketTextForPaste=r.prepareTextForTerminal=void 0,r.prepareTextForTerminal=a,r.bracketTextForPaste=c,r.copyHandler=function(d,f){d.clipboardData&&d.clipboardData.setData("text/plain",f.selectionText),d.preventDefault()},r.handlePasteEvent=function(d,f,p,u){d.stopPropagation(),d.clipboardData&&_(d.clipboardData.getData("text/plain"),f,p,u)},r.paste=_,r.moveTextAreaUnderMouseCursor=n,r.rightClickHandler=function(d,f,p,u,e){n(d,f,p),e&&u.rightClickSelect(d),f.value=u.selectionText,f.select()}},7239:(I,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ColorContrastCache=void 0;const c=a(1505);r.ColorContrastCache=class{constructor(){this._color=new c.TwoKeyMap,this._css=new c.TwoKeyMap}setCss(_,n,d){this._css.set(_,n,d)}getCss(_,n){return this._css.get(_,n)}setColor(_,n,d){this._color.set(_,n,d)}getColor(_,n){return this._color.get(_,n)}clear(){this._color.clear(),this._css.clear()}}},3656:(I,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.addDisposableDomListener=void 0,r.addDisposableDomListener=function(a,c,_,n){a.addEventListener(c,_,n);let d=!1;return{dispose:()=>{d||(d=!0,a.removeEventListener(c,_,n))}}}},6465:function(I,r,a){var c=this&&this.__decorate||function(e,s,t,i){var o,l=arguments.length,v=l<3?s:i===null?i=Object.getOwnPropertyDescriptor(s,t):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(e,s,t,i);else for(var m=e.length-1;m>=0;m--)(o=e[m])&&(v=(l<3?o(v):l>3?o(s,t,v):o(s,t))||v);return l>3&&v&&Object.defineProperty(s,t,v),v},_=this&&this.__param||function(e,s){return function(t,i){s(t,i,e)}};Object.defineProperty(r,"__esModule",{value:!0}),r.Linkifier2=void 0;const n=a(3656),d=a(8460),f=a(844),p=a(2585);let u=r.Linkifier2=class extends f.Disposable{get currentLink(){return this._currentLink}constructor(e){super(),this._bufferService=e,this._linkProviders=[],this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new d.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new d.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,f.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,f.toDisposable)((()=>{this._lastMouseEvent=void 0}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0})))}registerLinkProvider(e){return this._linkProviders.push(e),{dispose:()=>{const s=this._linkProviders.indexOf(e);s!==-1&&this._linkProviders.splice(s,1)}}}attachToDom(e,s,t){this._element=e,this._mouseService=s,this._renderService=t,this.register((0,n.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,n.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(e){if(this._lastMouseEvent=e,!this._element||!this._mouseService)return;const s=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!s)return;this._isMouseOut=!1;const t=e.composedPath();for(let i=0;i<t.length;i++){const o=t[i];if(o.classList.contains("xterm"))break;if(o.classList.contains("xterm-hover"))return}this._lastBufferCell&&s.x===this._lastBufferCell.x&&s.y===this._lastBufferCell.y||(this._handleHover(s),this._lastBufferCell=s)}_handleHover(e){if(this._activeLine!==e.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(e,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))}_askForLink(e,s){var t,i;this._activeProviderReplies&&s||((t=this._activeProviderReplies)===null||t===void 0||t.forEach((l=>{l==null||l.forEach((v=>{v.link.dispose&&v.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=e.y);let o=!1;for(const[l,v]of this._linkProviders.entries())s?!((i=this._activeProviderReplies)===null||i===void 0)&&i.get(l)&&(o=this._checkLinkProviderResult(l,e,o)):v.provideLinks(e.y,(m=>{var h,g;if(this._isMouseOut)return;const b=m==null?void 0:m.map((L=>({link:L})));(h=this._activeProviderReplies)===null||h===void 0||h.set(l,b),o=this._checkLinkProviderResult(l,e,o),((g=this._activeProviderReplies)===null||g===void 0?void 0:g.size)===this._linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)}))}_removeIntersectingLinks(e,s){const t=new Set;for(let i=0;i<s.size;i++){const o=s.get(i);if(o)for(let l=0;l<o.length;l++){const v=o[l],m=v.link.range.start.y<e?0:v.link.range.start.x,h=v.link.range.end.y>e?this._bufferService.cols:v.link.range.end.x;for(let g=m;g<=h;g++){if(t.has(g)){o.splice(l--,1);break}t.add(g)}}}}_checkLinkProviderResult(e,s,t){var i;if(!this._activeProviderReplies)return t;const o=this._activeProviderReplies.get(e);let l=!1;for(let v=0;v<e;v++)this._activeProviderReplies.has(v)&&!this._activeProviderReplies.get(v)||(l=!0);if(!l&&o){const v=o.find((m=>this._linkAtPosition(m.link,s)));v&&(t=!0,this._handleNewLink(v))}if(this._activeProviderReplies.size===this._linkProviders.length&&!t)for(let v=0;v<this._activeProviderReplies.size;v++){const m=(i=this._activeProviderReplies.get(v))===null||i===void 0?void 0:i.find((h=>this._linkAtPosition(h.link,s)));if(m){t=!0,this._handleNewLink(m);break}}return t}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._element||!this._mouseService||!this._currentLink)return;const s=this._positionFromMouseEvent(e,this._element,this._mouseService);s&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,s)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,s){this._element&&this._currentLink&&this._lastMouseEvent&&(!e||!s||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=s)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,f.disposeArray)(this._linkCacheDisposables))}_handleNewLink(e){if(!this._element||!this._lastMouseEvent||!this._mouseService)return;const s=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);s&&this._linkAtPosition(e.link,s)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0||e.link.decorations.underline,pointerCursor:e.link.decorations===void 0||e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>{var t,i;return(i=(t=this._currentLink)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.decorations.pointerCursor},set:t=>{var i,o;!((i=this._currentLink)===null||i===void 0)&&i.state&&this._currentLink.state.decorations.pointerCursor!==t&&(this._currentLink.state.decorations.pointerCursor=t,this._currentLink.state.isHovered&&((o=this._element)===null||o===void 0||o.classList.toggle("xterm-cursor-pointer",t)))}},underline:{get:()=>{var t,i;return(i=(t=this._currentLink)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.decorations.underline},set:t=>{var i,o,l;!((i=this._currentLink)===null||i===void 0)&&i.state&&((l=(o=this._currentLink)===null||o===void 0?void 0:o.state)===null||l===void 0?void 0:l.decorations.underline)!==t&&(this._currentLink.state.decorations.underline=t,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,t))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((t=>{if(!this._currentLink)return;const i=t.start===0?0:t.start+1+this._bufferService.buffer.ydisp,o=this._bufferService.buffer.ydisp+1+t.end;if(this._currentLink.link.range.start.y>=i&&this._currentLink.link.range.end.y<=o&&(this._clearCurrentLink(i,o),this._lastMouseEvent&&this._element)){const l=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);l&&this._askForLink(l,!1)}}))))}_linkHover(e,s,t){var i;!((i=this._currentLink)===null||i===void 0)&&i.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),s.hover&&s.hover(t,s.text)}_fireUnderlineEvent(e,s){const t=e.range,i=this._bufferService.buffer.ydisp,o=this._createLinkUnderlineEvent(t.start.x-1,t.start.y-i-1,t.end.x,t.end.y-i-1,void 0);(s?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(o)}_linkLeave(e,s,t){var i;!((i=this._currentLink)===null||i===void 0)&&i.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),s.leave&&s.leave(t,s.text)}_linkAtPosition(e,s){const t=e.range.start.y*this._bufferService.cols+e.range.start.x,i=e.range.end.y*this._bufferService.cols+e.range.end.x,o=s.y*this._bufferService.cols+s.x;return t<=o&&o<=i}_positionFromMouseEvent(e,s,t){const i=t.getCoords(e,s,this._bufferService.cols,this._bufferService.rows);if(i)return{x:i[0],y:i[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,s,t,i,o){return{x1:e,y1:s,x2:t,y2:i,cols:this._bufferService.cols,fg:o}}};r.Linkifier2=u=c([_(0,p.IBufferService)],u)},9042:(I,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.tooMuchOutput=r.promptLabel=void 0,r.promptLabel="Terminal input",r.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(I,r,a){var c=this&&this.__decorate||function(u,e,s,t){var i,o=arguments.length,l=o<3?e:t===null?t=Object.getOwnPropertyDescriptor(e,s):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(u,e,s,t);else for(var v=u.length-1;v>=0;v--)(i=u[v])&&(l=(o<3?i(l):o>3?i(e,s,l):i(e,s))||l);return o>3&&l&&Object.defineProperty(e,s,l),l},_=this&&this.__param||function(u,e){return function(s,t){e(s,t,u)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkProvider=void 0;const n=a(511),d=a(2585);let f=r.OscLinkProvider=class{constructor(u,e,s){this._bufferService=u,this._optionsService=e,this._oscLinkService=s}provideLinks(u,e){var s;const t=this._bufferService.buffer.lines.get(u-1);if(!t)return void e(void 0);const i=[],o=this._optionsService.rawOptions.linkHandler,l=new n.CellData,v=t.getTrimmedLength();let m=-1,h=-1,g=!1;for(let b=0;b<v;b++)if(h!==-1||t.hasContent(b)){if(t.loadCell(b,l),l.hasExtendedAttrs()&&l.extended.urlId){if(h===-1){h=b,m=l.extended.urlId;continue}g=l.extended.urlId!==m}else h!==-1&&(g=!0);if(g||h!==-1&&b===v-1){const L=(s=this._oscLinkService.getLinkData(m))===null||s===void 0?void 0:s.uri;if(L){const y={start:{x:h+1,y:u},end:{x:b+(g||b!==v-1?0:1),y:u}};let k=!1;if(!(o!=null&&o.allowNonHttpProtocols))try{const x=new URL(L);["http:","https:"].includes(x.protocol)||(k=!0)}catch{k=!0}k||i.push({text:L,range:y,activate:(x,T)=>o?o.activate(x,T,y):p(0,T),hover:(x,T)=>{var O;return(O=o==null?void 0:o.hover)===null||O===void 0?void 0:O.call(o,x,T,y)},leave:(x,T)=>{var O;return(O=o==null?void 0:o.leave)===null||O===void 0?void 0:O.call(o,x,T,y)}})}g=!1,l.hasExtendedAttrs()&&l.extended.urlId?(h=b,m=l.extended.urlId):(h=-1,m=-1)}}e(i)}};function p(u,e){if(confirm(`Do you want to navigate to ${e}?
|
|
4
4
|
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Remote Codex Supervisor</title>
|
|
7
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-D1R9CUnx.js"></script>
|
|
8
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BiuFei_K.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body class="bg-stone-950">
|
|
11
11
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -197,9 +197,22 @@ function pricingModelKeyForModel(model: string | null | undefined) {
|
|
|
197
197
|
return modelKey;
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
-
const
|
|
201
|
-
|
|
202
|
-
|
|
200
|
+
const providerSeparatorIndex = modelKey.indexOf('/');
|
|
201
|
+
const unqualifiedModelKey = providerSeparatorIndex >= 0
|
|
202
|
+
? modelKey.slice(providerSeparatorIndex + 1)
|
|
203
|
+
: null;
|
|
204
|
+
if (unqualifiedModelKey && models[unqualifiedModelKey]) {
|
|
205
|
+
return unqualifiedModelKey;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
for (const candidate of [modelKey, unqualifiedModelKey]) {
|
|
209
|
+
if (!candidate) {
|
|
210
|
+
continue;
|
|
211
|
+
}
|
|
212
|
+
const claudeDateSuffixMatch = candidate.match(/^(claude-[a-z]+-\d+(?:-\d+)?)-20\d{6}$/);
|
|
213
|
+
if (claudeDateSuffixMatch?.[1] && models[claudeDateSuffixMatch[1]]) {
|
|
214
|
+
return claudeDateSuffixMatch[1];
|
|
215
|
+
}
|
|
203
216
|
}
|
|
204
217
|
|
|
205
218
|
return modelKey;
|
|
@@ -104,6 +104,40 @@ function readableToolName(toolName: string) {
|
|
|
104
104
|
return toolName;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
+
function projectRelativePathLabel(value: string | null | undefined) {
|
|
108
|
+
const normalized = value?.trim();
|
|
109
|
+
if (!normalized) {
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const slashNormalized = normalized.replace(/\\/g, '/');
|
|
114
|
+
if (!slashNormalized.startsWith('/')) {
|
|
115
|
+
return slashNormalized.replace(/^\.\//, '');
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const markers = [
|
|
119
|
+
'/apps/',
|
|
120
|
+
'/packages/',
|
|
121
|
+
'/src/',
|
|
122
|
+
'/test/',
|
|
123
|
+
'/tests/',
|
|
124
|
+
'/docs/',
|
|
125
|
+
'/config/',
|
|
126
|
+
'/scripts/',
|
|
127
|
+
'/e2e/',
|
|
128
|
+
'/.agents/',
|
|
129
|
+
'/.codex/',
|
|
130
|
+
];
|
|
131
|
+
for (const marker of markers) {
|
|
132
|
+
const markerIndex = slashNormalized.indexOf(marker);
|
|
133
|
+
if (markerIndex >= 0) {
|
|
134
|
+
return slashNormalized.slice(markerIndex + 1);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
return slashNormalized;
|
|
139
|
+
}
|
|
140
|
+
|
|
107
141
|
function commandFromInput(input: unknown) {
|
|
108
142
|
if (!isRecord(input)) {
|
|
109
143
|
return null;
|
|
@@ -115,11 +149,13 @@ function pathFromInput(input: unknown) {
|
|
|
115
149
|
if (!isRecord(input)) {
|
|
116
150
|
return null;
|
|
117
151
|
}
|
|
118
|
-
return (
|
|
119
|
-
stringValue(input.
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
152
|
+
return projectRelativePathLabel(
|
|
153
|
+
stringValue(input.relative_path) ??
|
|
154
|
+
stringValue(input.relativePath) ??
|
|
155
|
+
stringValue(input.file_path) ??
|
|
156
|
+
stringValue(input.filePath) ??
|
|
157
|
+
stringValue(input.path) ??
|
|
158
|
+
stringValue(input.notebook_path),
|
|
123
159
|
);
|
|
124
160
|
}
|
|
125
161
|
|
|
@@ -2022,6 +2022,16 @@ describe('ClaudeRuntimeAdapter', () => {
|
|
|
2022
2022
|
file_path: 'packages/claude/src/runtimeAdapter.ts',
|
|
2023
2023
|
},
|
|
2024
2024
|
},
|
|
2025
|
+
{
|
|
2026
|
+
type: 'tool_use',
|
|
2027
|
+
id: 'toolu_edit',
|
|
2028
|
+
name: 'Edit',
|
|
2029
|
+
input: {
|
|
2030
|
+
file_path: '/home/u/dev/remoteCodex/apps/supervisor-api/src/thread-service.ts',
|
|
2031
|
+
old_string: 'before',
|
|
2032
|
+
new_string: 'after',
|
|
2033
|
+
},
|
|
2034
|
+
},
|
|
2025
2035
|
{
|
|
2026
2036
|
type: 'tool_use',
|
|
2027
2037
|
id: 'toolu_skill',
|
|
@@ -2069,6 +2079,11 @@ describe('ClaudeRuntimeAdapter', () => {
|
|
|
2069
2079
|
tool_use_id: 'toolu_read',
|
|
2070
2080
|
content: 'export class ClaudeRuntimeAdapter {}',
|
|
2071
2081
|
},
|
|
2082
|
+
{
|
|
2083
|
+
type: 'tool_result',
|
|
2084
|
+
tool_use_id: 'toolu_edit',
|
|
2085
|
+
content: 'File updated.',
|
|
2086
|
+
},
|
|
2072
2087
|
{
|
|
2073
2088
|
type: 'tool_result',
|
|
2074
2089
|
tool_use_id: 'toolu_skill',
|
|
@@ -2114,6 +2129,13 @@ describe('ClaudeRuntimeAdapter', () => {
|
|
|
2114
2129
|
text: 'Read file: packages/claude/src/runtimeAdapter.ts',
|
|
2115
2130
|
status: 'completed',
|
|
2116
2131
|
}),
|
|
2132
|
+
expect.objectContaining({
|
|
2133
|
+
id: 'toolu_edit',
|
|
2134
|
+
kind: 'fileChange',
|
|
2135
|
+
text: 'apps/supervisor-api/src/thread-service.ts',
|
|
2136
|
+
previewText: 'Edit file: apps/supervisor-api/src/thread-service.ts',
|
|
2137
|
+
status: 'completed',
|
|
2138
|
+
}),
|
|
2117
2139
|
expect.objectContaining({
|
|
2118
2140
|
id: 'toolu_skill',
|
|
2119
2141
|
kind: 'skillToolCall',
|
|
@@ -107,4 +107,31 @@ describe('codex history item persistence policy', () => {
|
|
|
107
107
|
status: 'running',
|
|
108
108
|
});
|
|
109
109
|
});
|
|
110
|
+
|
|
111
|
+
it('shows file changes using project-relative paths when absolute paths are reported', () => {
|
|
112
|
+
const turn = codexTurnToAgentTurn({
|
|
113
|
+
id: 'turn-1',
|
|
114
|
+
status: 'completed',
|
|
115
|
+
error: null,
|
|
116
|
+
items: [
|
|
117
|
+
{
|
|
118
|
+
id: 'file-change-1',
|
|
119
|
+
type: 'fileChange',
|
|
120
|
+
changes: [
|
|
121
|
+
{
|
|
122
|
+
path: '/home/u/dev/remoteCodex/apps/supervisor-web/src/App.tsx',
|
|
123
|
+
additions: 4,
|
|
124
|
+
deletions: 1,
|
|
125
|
+
},
|
|
126
|
+
],
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
expect(turn.items[0]).toMatchObject({
|
|
132
|
+
kind: 'fileChange',
|
|
133
|
+
text: 'apps/supervisor-web/src/App.tsx',
|
|
134
|
+
detailText: '- apps/supervisor-web/src/App.tsx (+4 -1)',
|
|
135
|
+
});
|
|
136
|
+
});
|
|
110
137
|
});
|
|
@@ -78,6 +78,40 @@ function uniqueStrings(values: Array<string | null | undefined>) {
|
|
|
78
78
|
return [...new Set(values.filter((value): value is string => Boolean(value?.trim())))];
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
+
function projectRelativePathLabel(value: string | null | undefined) {
|
|
82
|
+
const normalized = value?.trim();
|
|
83
|
+
if (!normalized) {
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const slashNormalized = normalized.replace(/\\/g, '/');
|
|
88
|
+
if (!slashNormalized.startsWith('/')) {
|
|
89
|
+
return slashNormalized.replace(/^\.\//, '');
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const markers = [
|
|
93
|
+
'/apps/',
|
|
94
|
+
'/packages/',
|
|
95
|
+
'/src/',
|
|
96
|
+
'/test/',
|
|
97
|
+
'/tests/',
|
|
98
|
+
'/docs/',
|
|
99
|
+
'/config/',
|
|
100
|
+
'/scripts/',
|
|
101
|
+
'/e2e/',
|
|
102
|
+
'/.agents/',
|
|
103
|
+
'/.codex/',
|
|
104
|
+
];
|
|
105
|
+
for (const marker of markers) {
|
|
106
|
+
const markerIndex = slashNormalized.indexOf(marker);
|
|
107
|
+
if (markerIndex >= 0) {
|
|
108
|
+
return slashNormalized.slice(markerIndex + 1);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return slashNormalized;
|
|
113
|
+
}
|
|
114
|
+
|
|
81
115
|
function normalizeTextLines(text: string) {
|
|
82
116
|
const lines = text.replace(/\r\n/g, '\n').split('\n');
|
|
83
117
|
|
|
@@ -1036,7 +1070,9 @@ function extractFileChangeEntries(item: CodexTurnItem) {
|
|
|
1036
1070
|
'old_path',
|
|
1037
1071
|
]),
|
|
1038
1072
|
),
|
|
1039
|
-
])
|
|
1073
|
+
])
|
|
1074
|
+
.map(projectRelativePathLabel)
|
|
1075
|
+
.find((entry): entry is string => Boolean(entry)) ?? null;
|
|
1040
1076
|
|
|
1041
1077
|
const explicitAdditions =
|
|
1042
1078
|
numberOrNull(
|
|
@@ -1075,7 +1111,8 @@ function extractFileChangeEntries(item: CodexTurnItem) {
|
|
|
1075
1111
|
: null;
|
|
1076
1112
|
const additions = explicitAdditions || diffStats?.additions || 0;
|
|
1077
1113
|
const deletions = explicitDeletions || diffStats?.deletions || 0;
|
|
1078
|
-
const normalizedPath =
|
|
1114
|
+
const normalizedPath =
|
|
1115
|
+
path ?? (diffText ? projectRelativePathLabel(extractPathFromDiffText(diffText)) : null);
|
|
1079
1116
|
|
|
1080
1117
|
if (!normalizedPath && additions === 0 && deletions === 0) {
|
|
1081
1118
|
return null;
|
|
@@ -152,6 +152,57 @@ describe('modelPricing', () => {
|
|
|
152
152
|
});
|
|
153
153
|
});
|
|
154
154
|
|
|
155
|
+
it('normalizes provider-qualified runtime model names to local pricing keys', () => {
|
|
156
|
+
expect(contextWindowForModel('openai/gpt-5.5')).toBe(272000);
|
|
157
|
+
expect(supportsFastMode('openai/gpt-5.5')).toBe(true);
|
|
158
|
+
expect(buildTurnPricingSnapshot('openai/gpt-5.5', false)).toEqual({
|
|
159
|
+
pricingModelKey: 'gpt-5.5',
|
|
160
|
+
pricingTierKey: 'standard',
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
const estimate = estimateTurnPrice(sampleUsage, {
|
|
164
|
+
pricingModelKey: 'openai/gpt-5.5',
|
|
165
|
+
pricingTierKey: 'standard',
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
expect(estimate).toMatchObject({
|
|
169
|
+
pricingModelKey: 'gpt-5.5',
|
|
170
|
+
pricingTierKey: 'standard',
|
|
171
|
+
inputUsd: 0.005,
|
|
172
|
+
cachedInputUsd: 0.00025,
|
|
173
|
+
outputUsd: 0.045,
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
it('normalizes provider-qualified Claude date-stamped model names', () => {
|
|
178
|
+
expect(contextWindowForModel('anthropic/claude-sonnet-4-5-20250929')).toBe(200000);
|
|
179
|
+
expect(buildTurnPricingSnapshot('anthropic/claude-sonnet-4-5-20250929', false)).toEqual({
|
|
180
|
+
pricingModelKey: 'claude-sonnet-4-5',
|
|
181
|
+
pricingTierKey: 'standard',
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
const estimate = estimateTurnPrice(sampleUsage, {
|
|
185
|
+
pricingModelKey: 'anthropic/claude-sonnet-4-5-20250929',
|
|
186
|
+
pricingTierKey: 'standard',
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
expect(estimate).toMatchObject({
|
|
190
|
+
pricingModelKey: 'claude-sonnet-4-5',
|
|
191
|
+
pricingTierKey: 'standard',
|
|
192
|
+
inputUsd: 0.003,
|
|
193
|
+
cachedInputUsd: 0.00015,
|
|
194
|
+
outputUsd: 0.0225,
|
|
195
|
+
});
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
it('leaves unknown provider-qualified models unpriced', () => {
|
|
199
|
+
expect(contextWindowForModel('unknown/not-priced')).toBe(null);
|
|
200
|
+
expect(estimateTurnPrice(sampleUsage, {
|
|
201
|
+
pricingModelKey: 'unknown/not-priced',
|
|
202
|
+
pricingTierKey: 'standard',
|
|
203
|
+
})).toBe(null);
|
|
204
|
+
});
|
|
205
|
+
|
|
155
206
|
it('resolves pricing config from the installed package root when provided', async () => {
|
|
156
207
|
const tempDir = await fs.mkdtemp(path.join(os.tmpdir(), 'remote-codex-pricing-root-'));
|
|
157
208
|
await fs.mkdir(path.join(tempDir, 'config'), { recursive: true });
|
|
@@ -927,6 +927,95 @@ describe('OpenCodeRuntimeAdapter', () => {
|
|
|
927
927
|
vi.useRealTimers();
|
|
928
928
|
});
|
|
929
929
|
|
|
930
|
+
it('treats string OpenCode session status values as terminal status', async () => {
|
|
931
|
+
vi.useFakeTimers();
|
|
932
|
+
const messages: unknown[] = [];
|
|
933
|
+
let busy = true;
|
|
934
|
+
const adapter = new OpenCodeRuntimeAdapter({
|
|
935
|
+
home: await tempHome(),
|
|
936
|
+
sdk: {
|
|
937
|
+
createOpencode: async () => ({
|
|
938
|
+
client: {
|
|
939
|
+
session: {
|
|
940
|
+
list: async () => [],
|
|
941
|
+
create: async () => ({
|
|
942
|
+
id: 'session-1',
|
|
943
|
+
directory: '/tmp/project',
|
|
944
|
+
}),
|
|
945
|
+
get: async () => ({
|
|
946
|
+
id: 'session-1',
|
|
947
|
+
directory: '/tmp/project',
|
|
948
|
+
}),
|
|
949
|
+
status: async () => ({
|
|
950
|
+
'session-1': busy ? 'busy' : 'idle',
|
|
951
|
+
}),
|
|
952
|
+
messages: async () => messages,
|
|
953
|
+
prompt: async () => {
|
|
954
|
+
messages.push(
|
|
955
|
+
{
|
|
956
|
+
info: {
|
|
957
|
+
id: 'user-message',
|
|
958
|
+
role: 'user',
|
|
959
|
+
time: { created: 1 },
|
|
960
|
+
},
|
|
961
|
+
parts: [{ type: 'text', text: 'new hi' }],
|
|
962
|
+
},
|
|
963
|
+
{
|
|
964
|
+
info: {
|
|
965
|
+
id: 'assistant-message',
|
|
966
|
+
role: 'assistant',
|
|
967
|
+
time: { created: 2 },
|
|
968
|
+
},
|
|
969
|
+
parts: [{ id: 'text-part', type: 'text', text: 'done' }],
|
|
970
|
+
},
|
|
971
|
+
);
|
|
972
|
+
setTimeout(() => {
|
|
973
|
+
busy = false;
|
|
974
|
+
}, 1_500);
|
|
975
|
+
return new Promise(() => {});
|
|
976
|
+
},
|
|
977
|
+
abort: async () => ({}),
|
|
978
|
+
},
|
|
979
|
+
},
|
|
980
|
+
server: {
|
|
981
|
+
url: 'http://127.0.0.1:4099',
|
|
982
|
+
close() {},
|
|
983
|
+
},
|
|
984
|
+
}),
|
|
985
|
+
},
|
|
986
|
+
});
|
|
987
|
+
const events: unknown[] = [];
|
|
988
|
+
adapter.on('event', (event) => events.push(event));
|
|
989
|
+
|
|
990
|
+
await adapter.start();
|
|
991
|
+
await adapter.startTurn({
|
|
992
|
+
providerSessionId: 'session-1',
|
|
993
|
+
prompt: 'new hi',
|
|
994
|
+
model: 'opencode/big-pickle',
|
|
995
|
+
workspacePath: '/tmp/project',
|
|
996
|
+
});
|
|
997
|
+
await vi.advanceTimersByTimeAsync(1_000);
|
|
998
|
+
|
|
999
|
+
expect(events).not.toContainEqual(expect.objectContaining({
|
|
1000
|
+
type: 'turn.completed',
|
|
1001
|
+
}));
|
|
1002
|
+
|
|
1003
|
+
await vi.advanceTimersByTimeAsync(1_500);
|
|
1004
|
+
|
|
1005
|
+
expect(events).toContainEqual(expect.objectContaining({
|
|
1006
|
+
type: 'turn.completed',
|
|
1007
|
+
turn: expect.objectContaining({
|
|
1008
|
+
items: expect.arrayContaining([
|
|
1009
|
+
expect.objectContaining({
|
|
1010
|
+
kind: 'agentMessage',
|
|
1011
|
+
text: 'done',
|
|
1012
|
+
}),
|
|
1013
|
+
]),
|
|
1014
|
+
}),
|
|
1015
|
+
}));
|
|
1016
|
+
vi.useRealTimers();
|
|
1017
|
+
});
|
|
1018
|
+
|
|
930
1019
|
it('emits token usage from OpenCode step finish parts', async () => {
|
|
931
1020
|
vi.useFakeTimers();
|
|
932
1021
|
const messages: unknown[] = [];
|
|
@@ -539,10 +539,14 @@ function turnTokenUsage(messages: unknown[], model: ReturnType<typeof parseModel
|
|
|
539
539
|
}
|
|
540
540
|
|
|
541
541
|
function openCodeStatusType(value: unknown): 'idle' | 'busy' | 'retry' | null {
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
542
|
+
const type =
|
|
543
|
+
typeof value === 'string'
|
|
544
|
+
? value
|
|
545
|
+
: isRecord(value)
|
|
546
|
+
? stringValue(value.type) ??
|
|
547
|
+
stringValue(value.status) ??
|
|
548
|
+
(isRecord(value.status) ? stringValue(value.status.type) : null)
|
|
549
|
+
: null;
|
|
546
550
|
return type === 'idle' || type === 'busy' || type === 'retry' ? type : null;
|
|
547
551
|
}
|
|
548
552
|
|
|
@@ -347,6 +347,7 @@ export interface ThreadHistoryItemDto {
|
|
|
347
347
|
kind:
|
|
348
348
|
| 'userMessage'
|
|
349
349
|
| 'agentMessage'
|
|
350
|
+
| 'artifact'
|
|
350
351
|
| 'image'
|
|
351
352
|
| 'plan'
|
|
352
353
|
| 'contextCompaction'
|
|
@@ -365,6 +366,7 @@ export interface ThreadHistoryItemDto {
|
|
|
365
366
|
detailText?: string | null;
|
|
366
367
|
hasDeferredDetail?: boolean | null;
|
|
367
368
|
sequence?: number | null;
|
|
369
|
+
transcriptOrder?: number | null;
|
|
368
370
|
sourceTurnId?: string | null;
|
|
369
371
|
status?: string | null;
|
|
370
372
|
assetPath?: string | null;
|
|
@@ -382,6 +384,7 @@ export interface ThreadHistoryItemDto {
|
|
|
382
384
|
kind: string;
|
|
383
385
|
text: string;
|
|
384
386
|
}> | null;
|
|
387
|
+
artifact?: ThreadArtifactDto | null;
|
|
385
388
|
}
|
|
386
389
|
|
|
387
390
|
export interface ThreadHistoryItemDetailDto {
|
|
@@ -391,6 +394,73 @@ export interface ThreadHistoryItemDetailDto {
|
|
|
391
394
|
text: string;
|
|
392
395
|
}
|
|
393
396
|
|
|
397
|
+
export interface ThreadArtifactDto {
|
|
398
|
+
id: string;
|
|
399
|
+
pluginId: string;
|
|
400
|
+
type: string;
|
|
401
|
+
title: string;
|
|
402
|
+
summaryText?: string | null;
|
|
403
|
+
payload: unknown;
|
|
404
|
+
assets?: Array<{
|
|
405
|
+
id: string;
|
|
406
|
+
mediaType: string;
|
|
407
|
+
url: string;
|
|
408
|
+
name?: string | null;
|
|
409
|
+
}> | null;
|
|
410
|
+
sourceTurnId?: string | null;
|
|
411
|
+
sourceItemId?: string | null;
|
|
412
|
+
createdAt: string;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
export interface PluginArtifactTypeDto {
|
|
416
|
+
type: string;
|
|
417
|
+
title: string;
|
|
418
|
+
fileExtensions?: string[];
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
export interface PluginThreadPanelDto {
|
|
422
|
+
id: string;
|
|
423
|
+
label: string;
|
|
424
|
+
artifactTypes: string[];
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
export interface PluginCapabilitiesDto {
|
|
428
|
+
artifactTypes: PluginArtifactTypeDto[];
|
|
429
|
+
timelineRenderers: string[];
|
|
430
|
+
threadPanels: PluginThreadPanelDto[];
|
|
431
|
+
frontend?: {
|
|
432
|
+
entry?: string;
|
|
433
|
+
style?: string;
|
|
434
|
+
};
|
|
435
|
+
backend?: {
|
|
436
|
+
entry?: string;
|
|
437
|
+
};
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
export interface PluginManifestDto {
|
|
441
|
+
id: string;
|
|
442
|
+
name: string;
|
|
443
|
+
version: string;
|
|
444
|
+
description: string;
|
|
445
|
+
remoteCodex: string;
|
|
446
|
+
capabilities: PluginCapabilitiesDto;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
export interface PluginDto extends PluginManifestDto {
|
|
450
|
+
enabled: boolean;
|
|
451
|
+
source?: 'builtin' | 'imported' | null;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
export interface UpdatePluginInput {
|
|
455
|
+
enabled: boolean;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
export interface ImportPluginInput {
|
|
459
|
+
manifest?: unknown;
|
|
460
|
+
manifestJson?: string;
|
|
461
|
+
enabled?: boolean;
|
|
462
|
+
}
|
|
463
|
+
|
|
394
464
|
export interface ThreadTurnTokenBreakdownDto {
|
|
395
465
|
totalTokens: number;
|
|
396
466
|
inputTokens: number;
|