@becrafter/prompt-manager 0.2.2 → 0.2.4-dev.5
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/package.json +15 -4
- package/packages/server/api/admin.routes.js +385 -0
- package/packages/server/mcp/prompt.handler.js +6 -6
- package/packages/server/server.js +13 -0
- package/packages/server/services/TerminalService.js +37 -17
- package/packages/server/services/skill-sync.service.js +223 -0
- package/packages/server/services/skills.service.js +731 -0
- package/packages/server/utils/config.js +8 -0
- package/packages/server/utils/util.js +27 -21
- package/packages/web/0.26974981f2e663e001ca.js +1 -0
- package/packages/web/112.895e73058c36df517412.js +1 -0
- package/packages/web/130.2145d293d97ee88902a1.js +1 -0
- package/packages/web/142.4ef07b4323c04c87bd81.js +1 -0
- package/packages/web/165.3b013a0e62121061ce41.js +2 -0
- package/packages/web/165.3b013a0e62121061ce41.js.LICENSE.txt +9 -0
- package/packages/web/203.a3697c577f74b6538257.js +1 -0
- package/packages/web/241.c0b98c14268a1d46d55d.js +1 -0
- package/packages/web/249.e10b6b8a1ac4f66185ea.js +1 -0
- package/packages/web/291.8c281d2823aa37833137.js +1 -0
- package/packages/web/319.5b4ef8bdd727fdac0520.js +1 -0
- package/packages/web/32.22d5433bcd9b6b4e98f1.js +1 -0
- package/packages/web/325.8810a3f94093d0f19341.js +1 -0
- package/packages/web/366.24666676c36ca63de8e1.js +1 -0
- package/packages/web/378.07aa22b5f489f8f1ec36.js +1 -0
- package/packages/web/391.f39db51c15feb65b46cb.js +1 -0
- package/packages/web/393.ab70195ea156eebec40b.js +1 -0
- package/packages/web/412.6d38dd3b290782c51ed6.js +1 -0
- package/packages/web/465.fb5ab26f362d3eb53da9.js +1 -0
- package/packages/web/48.7643e76aedee153e680c.js +1 -0
- package/packages/web/480.237737e805b568087d34.js +1 -0
- package/packages/web/489.182e98261f30e4da62d6.js +1 -0
- package/packages/web/490.3f311f0c36d0c52f8b52.js +1 -0
- package/packages/web/492.d07d9857e3682710f3a5.js +1 -0
- package/packages/web/495.60324846746eea7d588b.js +1 -0
- package/packages/web/510.b6e2c433d2f9bc9a1edd.js +1 -0
- package/packages/web/543.223a1c0b8345b4e65ed3.js +1 -0
- package/packages/web/567.e438fd025d21373bc95b.js +1 -0
- package/packages/web/592.c670d3500195bdb18ca4.js +1 -0
- package/packages/web/616.a8b495ba380ec0bcafd9.js +1 -0
- package/packages/web/617.bc4db899b54108068892.js +1 -0
- package/packages/web/641.1e5e900d36819777d808.js +1 -0
- package/packages/web/672.ae0e48b24fd6863bb4d1.js +1 -0
- package/packages/web/731.595770c0a8f30f8c453d.js +1 -0
- package/packages/web/746.3faf506c16dc0e6ae25a.js +1 -0
- package/packages/web/756.16d54ad97aadec6eb440.js +1 -0
- package/packages/web/77.d3de1da7532138022a7c.js +1 -0
- package/packages/web/802.0a9a7f92703bd3ed0228.js +1 -0
- package/packages/web/815.879527c51deda81ff3e6.js +1 -0
- package/packages/web/821.12f33b53b488b3995bb9.js +1 -0
- package/packages/web/846.64e9bb4b76cae3245c47.js +1 -0
- package/packages/web/869.aadd9a07fd56e04ba5dd.js +1 -0
- package/packages/web/885.6dc8edf4c16f6b578da6.js +1 -0
- package/packages/web/901.45604b599d11f86ae9d8.js +1 -0
- package/packages/web/928.69835904eae42113a3ce.js +1 -0
- package/packages/web/955.827020bdb97be41eb055.js +1 -0
- package/packages/web/981.e4d081b9d1dac0cd275f.js +1 -0
- package/packages/web/992.a3843959b85c7fdc6cf9.js +1 -0
- package/packages/web/996.07a82c3066973c75984b.js +1 -0
- package/packages/web/css/codemirror-theme_xq-light.css +43 -0
- package/packages/web/css/codemirror.css +344 -0
- package/packages/web/css/main.b013c98c7a56511f8710.css +9995 -0
- package/packages/web/css/main.css +4404 -0
- package/packages/web/css/skills.css +1753 -0
- package/packages/web/css/terminal.css +1218 -0
- package/packages/web/index.html +3 -0
- package/packages/web/main.cf6dd52dbaa4f935d45a.js +2 -0
- package/packages/web/main.cf6dd52dbaa4f935d45a.js.LICENSE.txt +3 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_becrafter_admin_ui=self.webpackChunk_becrafter_admin_ui||[]).push([[142],{8142(t,e,a){a.d(e,{diagram:()=>R});var i,n=a(4616),r=(a(9625),a(1152),a(45),a(5164),a(8698),a(5894),a(3245),a(2387),a(3798),a(3226)),d=a(1861),s=a(797),o=a(3617),g=a(8641),p=a(5429),h=(0,s.K2)(t=>t.append("circle").attr("class","start-state").attr("r",(0,d.D7)().state.sizeUnit).attr("cx",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit).attr("cy",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit),"drawStartState"),c=(0,s.K2)(t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",(0,d.D7)().state.textHeight).attr("class","divider").attr("x2",2*(0,d.D7)().state.textHeight).attr("y1",0).attr("y2",0),"drawDivider"),l=(0,s.K2)((t,e)=>{const a=t.append("text").attr("x",2*(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.textHeight+2*(0,d.D7)().state.padding).attr("font-size",(0,d.D7)().state.fontSize).attr("class","state-title").text(e.id),i=a.node().getBBox();return t.insert("rect",":first-child").attr("x",(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.padding).attr("width",i.width+2*(0,d.D7)().state.padding).attr("height",i.height+2*(0,d.D7)().state.padding).attr("rx",(0,d.D7)().state.radius),a},"drawSimpleState"),x=(0,s.K2)((t,e)=>{const a=(0,s.K2)(function(t,e,a){const i=t.append("tspan").attr("x",2*(0,d.D7)().state.padding).text(e);a||i.attr("dy",(0,d.D7)().state.textHeight)},"addTspan"),i=t.append("text").attr("x",2*(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.textHeight+1.3*(0,d.D7)().state.padding).attr("font-size",(0,d.D7)().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),n=i.height,r=t.append("text").attr("x",(0,d.D7)().state.padding).attr("y",n+.4*(0,d.D7)().state.padding+(0,d.D7)().state.dividerMargin+(0,d.D7)().state.textHeight).attr("class","state-description");let o=!0,g=!0;e.descriptions.forEach(function(t){o||(a(r,t,g),g=!1),o=!1});const p=t.append("line").attr("x1",(0,d.D7)().state.padding).attr("y1",(0,d.D7)().state.padding+n+(0,d.D7)().state.dividerMargin/2).attr("y2",(0,d.D7)().state.padding+n+(0,d.D7)().state.dividerMargin/2).attr("class","descr-divider"),h=r.node().getBBox(),c=Math.max(h.width,i.width);return p.attr("x2",c+3*(0,d.D7)().state.padding),t.insert("rect",":first-child").attr("x",(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.padding).attr("width",c+2*(0,d.D7)().state.padding).attr("height",h.height+n+2*(0,d.D7)().state.padding).attr("rx",(0,d.D7)().state.radius),t},"drawDescrState"),D=(0,s.K2)((t,e,a)=>{const i=(0,d.D7)().state.padding,n=2*(0,d.D7)().state.padding,r=t.node().getBBox(),s=r.width,o=r.x,g=t.append("text").attr("x",0).attr("y",(0,d.D7)().state.titleShift).attr("font-size",(0,d.D7)().state.fontSize).attr("class","state-title").text(e.id),p=g.node().getBBox().width+n;let h,c=Math.max(p,s);c===s&&(c+=n);const l=t.node().getBBox();e.doc,h=o-i,p>s&&(h=(s-c)/2+i),Math.abs(o-l.x)<i&&p>s&&(h=o-(p-s)/2);const x=1-(0,d.D7)().state.textHeight;return t.insert("rect",":first-child").attr("x",h).attr("y",x).attr("class",a?"alt-composit":"composit").attr("width",c).attr("height",l.height+(0,d.D7)().state.textHeight+(0,d.D7)().state.titleShift+1).attr("rx","0"),g.attr("x",h+i),p<=s&&g.attr("x",o+(c-n)/2-p/2+i),t.insert("rect",":first-child").attr("x",h).attr("y",(0,d.D7)().state.titleShift-(0,d.D7)().state.textHeight-(0,d.D7)().state.padding).attr("width",c).attr("height",3*(0,d.D7)().state.textHeight).attr("rx",(0,d.D7)().state.radius),t.insert("rect",":first-child").attr("x",h).attr("y",(0,d.D7)().state.titleShift-(0,d.D7)().state.textHeight-(0,d.D7)().state.padding).attr("width",c).attr("height",l.height+3+2*(0,d.D7)().state.textHeight).attr("rx",(0,d.D7)().state.radius),t},"addTitleAndBox"),u=(0,s.K2)(t=>(t.append("circle").attr("class","end-state-outer").attr("r",(0,d.D7)().state.sizeUnit+(0,d.D7)().state.miniPadding).attr("cx",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+(0,d.D7)().state.miniPadding).attr("cy",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+(0,d.D7)().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",(0,d.D7)().state.sizeUnit).attr("cx",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+2).attr("cy",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+2)),"drawEndState"),f=(0,s.K2)((t,e)=>{let a=(0,d.D7)().state.forkWidth,i=(0,d.D7)().state.forkHeight;if(e.parentId){let t=a;a=i,i=t}return t.append("rect").style("stroke","black").style("fill","black").attr("width",a).attr("height",i).attr("x",(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.padding)},"drawForkJoinState"),y=(0,s.K2)((t,e,a,i)=>{let n=0;const r=i.append("text");r.style("text-anchor","start"),r.attr("class","noteText");let s=t.replace(/\r\n/g,"<br/>");s=s.replace(/\n/g,"<br/>");const o=s.split(d.Y2.lineBreakRegex);let g=1.25*(0,d.D7)().state.noteMargin;for(const t of o){const i=t.trim();if(i.length>0){const t=r.append("tspan");t.text(i),0===g&&(g+=t.node().getBBox().height),n+=g,t.attr("x",e+(0,d.D7)().state.noteMargin),t.attr("y",a+n+1.25*(0,d.D7)().state.noteMargin)}}return{textWidth:r.node().getBBox().width,textHeight:n}},"_drawLongText"),w=(0,s.K2)((t,e)=>{e.attr("class","state-note");const a=e.append("rect").attr("x",0).attr("y",(0,d.D7)().state.padding),i=e.append("g"),{textWidth:n,textHeight:r}=y(t,0,0,i);return a.attr("height",r+2*(0,d.D7)().state.noteMargin),a.attr("width",n+2*(0,d.D7)().state.noteMargin),a},"drawNote"),m=(0,s.K2)(function(t,e){const a=e.id,i={id:a,label:e.id,width:0,height:0},n=t.append("g").attr("id",a).attr("class","stateGroup");"start"===e.type&&h(n),"end"===e.type&&u(n),"fork"!==e.type&&"join"!==e.type||f(n,e),"note"===e.type&&w(e.note.text,n),"divider"===e.type&&c(n),"default"===e.type&&0===e.descriptions.length&&l(n,e),"default"===e.type&&e.descriptions.length>0&&x(n,e);const r=n.node().getBBox();return i.width=r.width+2*(0,d.D7)().state.padding,i.height=r.height+2*(0,d.D7)().state.padding,i},"drawState"),b=0,B=(0,s.K2)(function(t,e,a){const i=(0,s.K2)(function(t){switch(t){case n.u4.relationType.AGGREGATION:return"aggregation";case n.u4.relationType.EXTENSION:return"extension";case n.u4.relationType.COMPOSITION:return"composition";case n.u4.relationType.DEPENDENCY:return"dependency"}},"getRelationType");e.points=e.points.filter(t=>!Number.isNaN(t.y));const g=e.points,p=(0,o.n8j)().x(function(t){return t.x}).y(function(t){return t.y}).curve(o.qrM),h=t.append("path").attr("d",p(g)).attr("id","edge"+b).attr("class","transition");let c="";if((0,d.D7)().state.arrowMarkerAbsolute&&(c=(0,d.ID)(!0)),h.attr("marker-end","url("+c+"#"+i(n.u4.relationType.DEPENDENCY)+"End)"),void 0!==a.title){const i=t.append("g").attr("class","stateLabel"),{x:n,y:o}=r._K.calcLabelPosition(e.points),g=d.Y2.getRows(a.title);let p=0;const h=[];let c=0,l=0;for(let t=0;t<=g.length;t++){const e=i.append("text").attr("text-anchor","middle").text(g[t]).attr("x",n).attr("y",o+p),a=e.node().getBBox();if(c=Math.max(c,a.width),l=Math.min(l,a.x),s.Rm.info(a.x,n,o+p),0===p){const t=e.node().getBBox();p=t.height,s.Rm.info("Title height",p,o)}h.push(e)}let x=p*g.length;if(g.length>1){const t=(g.length-1)*p*.5;h.forEach((e,a)=>e.attr("y",o+a*p-t)),x=p*g.length}const D=i.node().getBBox();i.insert("rect",":first-child").attr("class","box").attr("x",n-c/2-(0,d.D7)().state.padding/2).attr("y",o-x/2-(0,d.D7)().state.padding/2-3.5).attr("width",c+(0,d.D7)().state.padding).attr("height",x+(0,d.D7)().state.padding),s.Rm.info(D)}b++},"drawEdge"),k={},S=(0,s.K2)(function(){},"setConf"),N=(0,s.K2)(function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),E=(0,s.K2)(function(t,e,a,n){i=(0,d.D7)().state;const r=(0,d.D7)().securityLevel;let g;"sandbox"===r&&(g=(0,o.Ltv)("#i"+e));const p="sandbox"===r?(0,o.Ltv)(g.nodes()[0].contentDocument.body):(0,o.Ltv)("body"),h="sandbox"===r?g.nodes()[0].contentDocument:document;s.Rm.debug("Rendering diagram "+t);const c=p.select(`[id='${e}']`);N(c);const l=n.db.getRootDoc();v(l,c,void 0,!1,p,h,n);const x=i.padding,D=c.node().getBBox(),u=D.width+2*x,f=D.height+2*x,y=1.75*u;(0,d.a$)(c,f,y,i.useMaxWidth),c.attr("viewBox",`${D.x-i.padding} ${D.y-i.padding} `+u+" "+f)},"draw"),M=(0,s.K2)(t=>t?t.length*i.fontSizeFactor:1,"getLabelWidth"),v=(0,s.K2)((t,e,a,n,r,o,h)=>{const c=new p.T({compound:!0,multigraph:!0});let l,x=!0;for(l=0;l<t.length;l++)if("relation"===t[l].stmt){x=!1;break}a?c.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:x?1:i.edgeLengthFactor,nodeSep:x?1:50,isMultiGraph:!0}):c.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:x?1:i.edgeLengthFactor,nodeSep:x?1:50,ranker:"tight-tree",isMultiGraph:!0}),c.setDefaultEdgeLabel(function(){return{}});const u=h.db.getStates(),f=h.db.getRelations(),y=Object.keys(u);for(const t of y){const d=u[t];let s;if(a&&(d.parentId=a),d.doc){let t=e.append("g").attr("id",d.id).attr("class","stateGroup");s=v(d.doc,t,d.id,!n,r,o,h);{t=D(t,d,n);let e=t.node().getBBox();s.width=e.width,s.height=e.height+i.padding/2,k[d.id]={y:i.compositTitleSize}}}else s=m(e,d,c);if(d.note){const t={descriptions:[],id:d.id+"-note",note:d.note,type:"note"},a=m(e,t,c);"left of"===d.note.position?(c.setNode(s.id+"-note",a),c.setNode(s.id,s)):(c.setNode(s.id,s),c.setNode(s.id+"-note",a)),c.setParent(s.id,s.id+"-group"),c.setParent(s.id+"-note",s.id+"-group")}else c.setNode(s.id,s)}s.Rm.debug("Count=",c.nodeCount(),c);let w=0;f.forEach(function(t){w++,s.Rm.debug("Setting edge",t),c.setEdge(t.id1,t.id2,{relation:t,width:M(t.title),height:i.labelHeight*d.Y2.getRows(t.title).length,labelpos:"c"},"id"+w)}),(0,g.Zp)(c),s.Rm.debug("Graph after layout",c.nodes());const b=e.node();c.nodes().forEach(function(t){void 0!==t&&void 0!==c.node(t)?(s.Rm.warn("Node "+t+": "+JSON.stringify(c.node(t))),r.select("#"+b.id+" #"+t).attr("transform","translate("+(c.node(t).x-c.node(t).width/2)+","+(c.node(t).y+(k[t]?k[t].y:0)-c.node(t).height/2)+" )"),r.select("#"+b.id+" #"+t).attr("data-x-shift",c.node(t).x-c.node(t).width/2),o.querySelectorAll("#"+b.id+" #"+t+" .divider").forEach(t=>{const e=t.parentElement;let a=0,i=0;e&&(e.parentElement&&(a=e.parentElement.getBBox().width),i=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(i)&&(i=0)),t.setAttribute("x1",0-i+8),t.setAttribute("x2",a-i-8)})):s.Rm.debug("No Node "+t+": "+JSON.stringify(c.node(t)))});let S=b.getBBox();c.edges().forEach(function(t){void 0!==t&&void 0!==c.edge(t)&&(s.Rm.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(c.edge(t))),B(e,c.edge(t),c.edge(t).relation))}),S=b.getBBox();const N={id:a||"root",label:a||"root",width:0,height:0};return N.width=S.width+2*i.padding,N.height=S.height+2*i.padding,s.Rm.debug("Doc rendered",N,c),N},"renderDoc"),K={setConf:S,draw:E},R={parser:n.Zk,get db(){return new n.u4(1)},renderer:K,styles:n.tM,init:(0,s.K2)(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}}}]);
|