limixbot 0.3.118 → 0.3.119
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{ActivityPanel-D0KzaLSM.js → ActivityPanel-l9mkZj3c.js} +1 -1
- package/dist/assets/{App-zFyDHpWG.js → App-CEAzIqrp.js} +39 -39
- package/dist/assets/{AppEventEditor-sHziWn3v.js → AppEventEditor-BKzVDU63.js} +1 -1
- package/dist/assets/{BotSettingsDialog-BurY3EqJ.js → BotSettingsDialog-BvwqItvE.js} +1 -1
- package/dist/assets/{BrowserPanel-BWaLYZKx.js → BrowserPanel-bnuqUOz3.js} +1 -1
- package/dist/assets/{BrowserProfilesManager-CdIpBHTc.js → BrowserProfilesManager-CUcXphXT.js} +1 -1
- package/dist/assets/{CloudAddDialog-CB8wDxwp.js → CloudAddDialog-CLEsRgra.js} +1 -1
- package/dist/assets/{ComputerFilesPane-BzE_KXPA.js → ComputerFilesPane-CE6kJr6z.js} +1 -1
- package/dist/assets/{ComputerPanel-ChCzmSlC.js → ComputerPanel-CfHxPV-U.js} +2 -2
- package/dist/assets/{DataPanel-7we9c7pu.js → DataPanel-DlfWhJ2l.js} +1 -1
- package/dist/assets/{DesktopViewer-Bxgv0PU8.js → DesktopViewer-CjIy0D2v.js} +1 -1
- package/dist/assets/{GrokMoveDialog-DhexplQR.js → GrokMoveDialog-BNWxAa5N.js} +1 -1
- package/dist/assets/{InspectorPanel-BPYilEJU.js → InspectorPanel-B6K0R7ZI.js} +1 -1
- package/dist/assets/{KeyboardShortcutsModal-CQQ6KV0K.js → KeyboardShortcutsModal-BsuaxSbW.js} +1 -1
- package/dist/assets/{LimixResizeHandles-BDK9cm0J.js → LimixResizeHandles-LTylExKz.js} +1 -1
- package/dist/assets/{LiveDesktop-CGM59sts.js → LiveDesktop-wCtWba6M.js} +1 -1
- package/dist/assets/{LocalVmWorkspace--AY6YKvR.js → LocalVmWorkspace-HjB7RZ-Z.js} +1 -1
- package/dist/assets/{MacLocalControl-D8kvLy1b.js → MacLocalControl-LWJJgz11.js} +1 -1
- package/dist/assets/{MarkdownFilePreview-DawkE0MD.js → MarkdownFilePreview-DSrxVVhX.js} +1 -1
- package/dist/assets/{MenuMotion-READmdk4.js → MenuMotion-Dr44d4Sg.js} +1 -1
- package/dist/assets/{NewBotDialog-DdxqTnNw.js → NewBotDialog-CdjLWn-L.js} +1 -1
- package/dist/assets/{PhoneAppDialog-MCSHv0Yl.js → PhoneAppDialog-BoNheaDw.js} +1 -1
- package/dist/assets/{PlacesRail-3RYT-fm8.js → PlacesRail-BesUMTCh.js} +1 -1
- package/dist/assets/{PluginsPanel-Cy9ntn3B.js → PluginsPanel-CPjWtDIQ.js} +1 -1
- package/dist/assets/{ProIntroduction-B5jCzDs1.js → ProIntroduction-CTl2MGYw.js} +1 -1
- package/dist/assets/{RemoteAgentSettingsPanel-Dntwp988.js → RemoteAgentSettingsPanel-BwW8Dn4E.js} +1 -1
- package/dist/assets/{RoomPanel-B9SDwPbf.js → RoomPanel-CMUHW-ng.js} +1 -1
- package/dist/assets/{RoutinesPage-o4aF8_qs.js → RoutinesPage-DB91MHqs.js} +1 -1
- package/dist/assets/{SettingsModal-CGTUsDfy.js → SettingsModal-BsrT3E14.js} +1 -1
- package/dist/assets/{ShareTeamDialog-B6EYRWvu.js → ShareTeamDialog-CcBEpMqD.js} +1 -1
- package/dist/assets/{SignedInSites-DKeE15y0.js → SignedInSites-DkT1rvTd.js} +1 -1
- package/dist/assets/{TeamLibraryPanel-Df5k1HgV.js → TeamLibraryPanel-zV-86ahA.js} +1 -1
- package/dist/assets/{TeamMapPage-Ba07EWOq.js → TeamMapPage-CZgGndK3.js} +1 -1
- package/dist/assets/{TriggersPage-BFpVZd69.js → TriggersPage-DbVlUurg.js} +1 -1
- package/dist/assets/{VisibilitySection-DDK6CG0T.js → VisibilitySection-BFM8tVU4.js} +1 -1
- package/dist/assets/{WebhookTrigger-Bj8V3yyI.js → WebhookTrigger-CHg2JRGq.js} +1 -1
- package/dist/assets/{WorksOnGrid-CJdNJU6D.js → WorksOnGrid-Bakox8KX.js} +1 -1
- package/dist/assets/{abnfDiagram-YUKMZFIV-CcYOrZM4.js → abnfDiagram-YUKMZFIV-BLl3M72Y.js} +1 -1
- package/dist/assets/{activity-Cy9rKER-.js → activity-BD0le1xR.js} +1 -1
- package/dist/assets/{architectureDiagram-47P4ROYG-QRNgdlWx.js → architectureDiagram-47P4ROYG-BKw1JqBi.js} +1 -1
- package/dist/assets/{blockDiagram-E7TT5TSB-ppwWjVH6.js → blockDiagram-E7TT5TSB-HVVfy-Ws.js} +1 -1
- package/dist/assets/{c4Diagram-CRA5TL53-DqgHx7sF.js → c4Diagram-CRA5TL53-BL3YpSpN.js} +1 -1
- package/dist/assets/{calendar-days-BuEc0yb0.js → calendar-days-1cqz7Ifz.js} +1 -1
- package/dist/assets/channel-D5DQY7uW.js +1 -0
- package/dist/assets/{chunk-2Q5K7J3B-DX68ySlL.js → chunk-2Q5K7J3B-CeSeWLIk.js} +1 -1
- package/dist/assets/{chunk-5VM5RSS4-CRYUMaqs.js → chunk-5VM5RSS4-CP9FyxOA.js} +1 -1
- package/dist/assets/{chunk-7TKQ45FW-4KPnQ7rv.js → chunk-7TKQ45FW-BD8nXZMu.js} +1 -1
- package/dist/assets/{chunk-AW2ZBBNX-Ck6rP8_F.js → chunk-AW2ZBBNX-0ZqQpSHA.js} +1 -1
- package/dist/assets/{chunk-FVRAUYC3-ah6pBL9_.js → chunk-FVRAUYC3-DnbUv5ih.js} +2 -2
- package/dist/assets/{chunk-HTAEGDNF-CFUx73AN.js → chunk-HTAEGDNF-C6vXgDDh.js} +1 -1
- package/dist/assets/{chunk-JWPE2WC7-BtyPINi9.js → chunk-JWPE2WC7-DesmsY-i.js} +1 -1
- package/dist/assets/{chunk-KQW6MTUR-DdZVmWiZ.js → chunk-KQW6MTUR-DqxFitou.js} +1 -1
- package/dist/assets/{chunk-XXDRQBXY-BQnjxxw-.js → chunk-XXDRQBXY-BN7QewPG.js} +1 -1
- package/dist/assets/{classDiagram-v2-K4WV4PDN-DW84gvez.js → classDiagram-v2-K4WV4PDN-YRXcnAI7.js} +1 -1
- package/dist/assets/{coins-DTHSSVDb.js → coins-C0JNNRI8.js} +1 -1
- package/dist/assets/{core-CRuI-yVu.js → core-Cjaw1pBq.js} +1 -1
- package/dist/assets/{cose-bilkent-JH36ORCC-C5-KwaFh.js → cose-bilkent-JH36ORCC-Bq7ZOfS1.js} +1 -1
- package/dist/assets/{cynefin-EF2NZ3EQ-Dfpgx0zV.js → cynefin-EF2NZ3EQ-1YtNassh.js} +1 -1
- package/dist/assets/{cynefinDiagram-3GCD6N5R-euE42BiW.js → cynefinDiagram-3GCD6N5R-CYdm1a4z.js} +1 -1
- package/dist/assets/{dagre-W4DXFKR2-CqgqOV2u.js → dagre-W4DXFKR2-CYYIoKNJ.js} +1 -1
- package/dist/assets/{diagram-2UJZ2QOL-SYIul3XW.js → diagram-2UJZ2QOL-AfvMlHaA.js} +1 -1
- package/dist/assets/{diagram-OVF4WLC6-BJ_9MDf7.js → diagram-OVF4WLC6-CId2XHJo.js} +1 -1
- package/dist/assets/{diagram-PFPMY2P6-CLkwFWgH.js → diagram-PFPMY2P6-CZ6wwAIp.js} +1 -1
- package/dist/assets/{diagram-UMYRVEAY-BWymfRkc.js → diagram-UMYRVEAY-2rdqvAyj.js} +1 -1
- package/dist/assets/{diagram-YEKJPTXX-DTYiQCkc.js → diagram-YEKJPTXX-CzFOtASF.js} +1 -1
- package/dist/assets/{diagram-ZIFT7M5P-cyKVn8bx.js → diagram-ZIFT7M5P-BXtJL6Hs.js} +1 -1
- package/dist/assets/{ebnfDiagram-VR2GEFS7-D3FYPm4E.js → ebnfDiagram-VR2GEFS7--9NrfBsf.js} +1 -1
- package/dist/assets/{elk-IJKZMXRS-B9Y5v74A.js → elk-IJKZMXRS-BUd9kRjk.js} +1 -1
- package/dist/assets/{erDiagram-O2IAPWRE-B01bWnCU.js → erDiagram-O2IAPWRE-D5un12g2.js} +1 -1
- package/dist/assets/{file-up-CMuz1zvC.js → file-up-BK-GpV56.js} +1 -1
- package/dist/assets/{flowDiagram-OXPTDLAJ-D34L-z_p.js → flowDiagram-OXPTDLAJ-D90Nha-R.js} +1 -1
- package/dist/assets/{ganttDiagram-R7TSEDQI-SSpa2go0.js → ganttDiagram-R7TSEDQI-CXDNUvwD.js} +1 -1
- package/dist/assets/{gitGraphDiagram-XJZIOB7I-D4QyGSNB.js → gitGraphDiagram-XJZIOB7I-D9c3rqK7.js} +1 -1
- package/dist/assets/{import-name-C-HWHnM2.js → import-name-Bjlw9jiM.js} +1 -1
- package/dist/assets/{index-CjtChfAw.js → index-1nLJcLwH.js} +3 -3
- package/dist/assets/{index-CzF2QuHP.js → index-EVmEXe2l.js} +1 -1
- package/dist/assets/{infoDiagram-5W2HQ5XZ-DRXD_gGG.js → infoDiagram-5W2HQ5XZ-ChgTrLoU.js} +1 -1
- package/dist/assets/{ishikawaDiagram-K3B6WC7H-Cbz9h0zI.js → ishikawaDiagram-K3B6WC7H-4d-ra134.js} +1 -1
- package/dist/assets/{journeyDiagram-COXZFDF6-CIRrlGIj.js → journeyDiagram-COXZFDF6-DE3SFHQI.js} +1 -1
- package/dist/assets/{kanban-definition-P3RFRI5V-BnNHmxZS.js → kanban-definition-P3RFRI5V-WHyDyN0K.js} +1 -1
- package/dist/assets/{mcp-servers-UAcu8HOu.js → mcp-servers-zi8N7I1M.js} +1 -1
- package/dist/assets/{mermaid.core-BsWFxjqV.js → mermaid.core-BgIjIYGw.js} +4 -4
- package/dist/assets/{mindmap-definition-LZFPQGKD-DMAxqVbt.js → mindmap-definition-LZFPQGKD-C2wXpw2Y.js} +1 -1
- package/dist/assets/{minimize-6B5ELLt0.js → minimize-DGmHDh7q.js} +1 -1
- package/dist/assets/{monitor-Ehduuiym.js → monitor-DwKv3TJO.js} +1 -1
- package/dist/assets/{new-bot-wl6Y52Eh.js → new-bot-mpygivK8.js} +1 -1
- package/dist/assets/{org-library-DjAEblry.js → org-library-YpW2P8UH.js} +1 -1
- package/dist/assets/{package-format-n9juk_T9.js → package-format-C1QxHZKk.js} +1 -1
- package/dist/assets/{pegDiagram-BGZESJAR-COqh-ipl.js → pegDiagram-BGZESJAR-DmC21U9r.js} +1 -1
- package/dist/assets/{pieDiagram-CAPJLFHJ-uVAdeX9H.js → pieDiagram-CAPJLFHJ-vZCQswrx.js} +1 -1
- package/dist/assets/{quadrantDiagram-GDMTTRAM-BLxlDgKj.js → quadrantDiagram-GDMTTRAM-9CSeK6Ec.js} +1 -1
- package/dist/assets/{rail-BtHXwx0F.js → rail-C9Rg-ai8.js} +1 -1
- package/dist/assets/{railroadDiagram-SM67HX2B-CNLKwWIs.js → railroadDiagram-SM67HX2B-CuAapYjG.js} +1 -1
- package/dist/assets/{remote-desktop-panel-CMiAx-v8.js → remote-desktop-panel-CDUUA-78.js} +1 -1
- package/dist/assets/{requirementDiagram-X7JNWC4A-B1Q6pnLp.js → requirementDiagram-X7JNWC4A-Z6-yH-Yc.js} +1 -1
- package/dist/assets/{sankeyDiagram-UM26HJRW-B-wlfroq.js → sankeyDiagram-UM26HJRW-DRL0o9kw.js} +1 -1
- package/dist/assets/{sequenceDiagram-ZO4K6R2Y-BFkq-aWE.js → sequenceDiagram-ZO4K6R2Y-CjUuhQJY.js} +1 -1
- package/dist/assets/{sizeCapture-INFHLROL-d7OKTLuS.js → sizeCapture-INFHLROL-xdHwem6V.js} +1 -1
- package/dist/assets/{stateDiagram-v2-TBUQTH76-C9VhSgkW.js → stateDiagram-v2-TBUQTH76-urcMLCUo.js} +1 -1
- package/dist/assets/{styles-DaC7RuGF.js → styles-ezcN4hc0.js} +2 -2
- package/dist/assets/{swimlanes-N4OXWK64-BKMbL529.js → swimlanes-N4OXWK64-ClTKvZff.js} +1 -1
- package/dist/assets/swimlanesDiagram-K3J5GTZL-JZFQwn_N.js +8 -0
- package/dist/assets/{team-share-Coietrtx.js → team-share-C8QPbhlx.js} +1 -1
- package/dist/assets/{timeline-definition-YOQAKGHF-Brlao894.js → timeline-definition-YOQAKGHF-BGWubzUQ.js} +1 -1
- package/dist/assets/{usecaseDiagram-VIAY4XPW-rHe31x4C.js → usecaseDiagram-VIAY4XPW-G0y52LjU.js} +1 -1
- package/dist/assets/{vennDiagram-BLWOH2XV-CVPMP5Mu.js → vennDiagram-BLWOH2XV-4R1dCvSS.js} +1 -1
- package/dist/assets/{vi-C4tbIHps.js → vi-CARA8M-R.js} +1 -1
- package/dist/assets/{wardleyDiagram-YMQ3BMBF-DiqzZU9h.js → wardleyDiagram-YMQ3BMBF-B-ya4KDL.js} +1 -1
- package/dist/assets/{xychartDiagram-TAQBALBS-8pBO04wD.js → xychartDiagram-TAQBALBS-YO0UkwUA.js} +1 -1
- package/dist/index.html +2 -2
- package/dist/rail.html +4 -4
- package/dist-server/index.js +23 -23
- package/dist-server/package.json +1 -1
- package/dist-server/server/cloud-connected-apps.js +1 -1
- package/dist-server/server/team-connections.js +2 -2
- package/package.json +1 -1
- package/dist/assets/channel-Cj6Zhjek.js +0 -1
- package/dist/assets/swimlanesDiagram-K3J5GTZL-C1wqbgzh.js +0 -8
package/dist/assets/{wardleyDiagram-YMQ3BMBF-DiqzZU9h.js → wardleyDiagram-YMQ3BMBF-B-ya4KDL.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as Mt}from"./chunk-JWPE2WC7-
|
|
1
|
+
import{p as Mt}from"./chunk-JWPE2WC7-DesmsY-i.js";import{s as Nt,g as Tt,x as zt,v as Lt,a as At,b as Xt,_ as u,V as Et,O as Yt,Q as U,l as K,T as It,d as Bt,D as Ft,c as V}from"./mermaid.core-BgIjIYGw.js";import{p as Ot}from"./cynefin-EF2NZ3EQ-1YtNassh.js";import"./styles-ezcN4hc0.js";import"./step-CkmJJ7wq.js";var G=u((o,r)=>{const e=o<=1?o*100:o;if(e<0||e>100)throw new Error(`${r} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${o}`);return e},"toPercent"),A=u((o,r,e)=>({x:G(r,`${e} evolution`),y:G(o,`${e} visibility`)}),"toCoordinates"),J=u(o=>{if(o){if(o==="+<>")return"bidirectional";if(o==="+<")return"backward";if(o==="+>")return"forward"}},"getFlowFromPort"),Rt=u(o=>{if(!o?.startsWith("+"))return{};const e=/^\+'([^']*)'/.exec(o)?.[1];return o.includes("<>")?{flow:"bidirectional",label:e}:o.includes("<")?{flow:"backward",label:e}:o.includes(">")?{flow:"forward",label:e}:{label:e}},"extractFlowFromArrow"),Wt=u((o,r)=>{if(Mt(o,r),o.size&&r.setSize(o.size.width,o.size.height),o.evolution){const e=o.evolution.stages.map(a=>a.secondName?`${a.name.trim()} / ${a.secondName.trim()}`:a.name.trim()),h=o.evolution.stages.filter(a=>a.boundary!==void 0).map(a=>a.boundary);r.updateAxes({stages:e,stageBoundaries:h})}if(o.anchors.forEach(e=>{const h=A(e.visibility,e.evolution,`Anchor "${e.name}"`);r.addNode(e.name,e.name,h.x,h.y,"anchor")}),o.components.forEach(e=>{const h=A(e.visibility,e.evolution,`Component "${e.name}"`),a=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,d=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,w=e.decorator?.strategy;r.addNode(e.name,e.name,h.x,h.y,"component",a,d,e.inertia,w)}),o.notes.forEach(e=>{const h=A(e.visibility,e.evolution,`Note "${e.text}"`);r.addNote(e.text,h.x,h.y)}),o.pipelines.forEach(e=>{const h=r.getNode(e.parent);if(!h||typeof h.y!="number")throw new Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);const a=h.y;r.startPipeline(e.parent),e.components.forEach(d=>{const w=`${e.parent}_${d.name}`,C=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,O=G(d.evolution,`Pipeline component "${d.name}" evolution`);r.addNode(w,d.name,O,a,"pipeline-component",C,g),r.addPipelineComponent(e.parent,w)})}),o.links.forEach(e=>{const h=!!e.arrow&&(e.arrow.includes("-.->")||e.arrow.includes(".-."));let a=J(e.fromPort)??J(e.toPort);const{flow:d,label:w}=Rt(e.arrow);!a&&d&&(a=d);const C=e.linkLabel,g=w??C;r.addLink(r.resolveNodeId(e.from),r.resolveNodeId(e.to),h,g,a)}),o.evolves.forEach(e=>{const h=r.getNode(e.component);if(h?.y!==void 0){const a=G(e.target,`Evolve target for "${e.component}"`);r.addTrend(e.component,a,h.y)}}),o.annotations.length>0){const e=o.annotations[0],h=A(e.x,e.y,"Annotations box");r.setAnnotationsBox(h.x,h.y)}o.annotation.forEach(e=>{const h=A(e.x,e.y,`Annotation ${e.number}`);r.addAnnotation(e.number,[{x:h.x,y:h.y}],e.text)}),o.accelerators.forEach(e=>{const h=A(e.x,e.y,`Accelerator "${e.name}"`);r.addAccelerator(e.name,h.x,h.y)}),o.deaccelerators.forEach(e=>{const h=A(e.x,e.y,`Deaccelerator "${e.name}"`);r.addDeaccelerator(e.name,h.x,h.y)})},"populateDb"),tt={parser:{yy:void 0},parse:u(async o=>{const r=await Ot("wardley",o);K.debug(r);const e=tt.parser?.yy;if(!e||typeof e.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Wt(r,e)},"parse")},E,Dt=(E=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}addNode(r){const e=this.nodes.get(r.id)??{id:r.id,label:r.label},h={...e,...r,className:r.className??e.className,labelOffsetX:r.labelOffsetX??e.labelOffsetX,labelOffsetY:r.labelOffsetY??e.labelOffsetY};this.nodes.set(r.id,h)}addLink(r){this.links.push(r)}addTrend(r){this.trends.set(r.nodeId,r)}startPipeline(r){this.pipelines.set(r,{nodeId:r,componentIds:[]});const e=this.nodes.get(r);e&&(e.isPipelineParent=!0)}addPipelineComponent(r,e){const h=this.pipelines.get(r);h&&h.componentIds.push(e);const a=this.nodes.get(e);a&&(a.inPipeline=!0)}addAnnotation(r){this.annotations.push(r)}addNote(r){this.notes.push(r)}addAccelerator(r){this.accelerators.push(r)}addDeaccelerator(r){this.deaccelerators.push(r)}setAnnotationsBox(r,e){this.annotationsBox={x:r,y:e}}setAxes(r){this.axes={...this.axes,...r}}setSize(r,e){this.size={width:r,height:e}}getNode(r){return this.nodes.get(r)}resolveNodeId(r){if(this.nodes.has(r))return r;for(const[e,h]of this.nodes)if(h.label===r)return e;return r}build(){const r=[];for(const e of this.nodes.values()){if(typeof e.x!="number"||typeof e.y!="number")throw new Error(`Node "${e.label}" is missing coordinates`);r.push(e)}return{nodes:r,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},u(E,"WardleyBuilder"),E),k=new Dt;function et(){return V()["wardley-beta"]}u(et,"getConfig");function at(o,r,e,h,a,d,w,C,g){k.addNode({id:o,label:r,x:e,y:h,className:a,labelOffsetX:d,labelOffsetY:w,inertia:C,sourceStrategy:g})}u(at,"addNode");function rt(o,r,e=!1,h,a){k.addLink({source:o,target:r,dashed:e,label:h,flow:a})}u(rt,"addLink");function ot(o,r,e){k.addTrend({nodeId:o,targetX:r,targetY:e})}u(ot,"addTrend");function nt(o,r,e){k.addAnnotation({number:o,coordinates:r,text:e})}u(nt,"addAnnotation");function st(o,r,e){k.addNote({text:o,x:r,y:e})}u(st,"addNote");function it(o,r,e){k.addAccelerator({name:o,x:r,y:e})}u(it,"addAccelerator");function dt(o,r,e){k.addDeaccelerator({name:o,x:r,y:e})}u(dt,"addDeaccelerator");function lt(o,r){k.setAnnotationsBox(o,r)}u(lt,"setAnnotationsBox");function ct(o,r){k.setSize(o,r)}u(ct,"setSize");function pt(o){k.startPipeline(o)}u(pt,"startPipeline");function ft(o,r){k.addPipelineComponent(o,r)}u(ft,"addPipelineComponent");function ht(o){k.setAxes(o)}u(ht,"updateAxes");function xt(o){return k.getNode(o)}u(xt,"getNode");function gt(o){return k.resolveNodeId(o)}u(gt,"resolveNodeId");function yt(){return k.build()}u(yt,"getWardleyData");function ut(){k.clear(),Ft()}u(ut,"clear");var Gt={getConfig:et,addNode:at,addLink:rt,addTrend:ot,addAnnotation:nt,addNote:st,addAccelerator:it,addDeaccelerator:dt,setAnnotationsBox:lt,setSize:ct,startPipeline:pt,addPipelineComponent:ft,updateAxes:ht,getNode:xt,resolveNodeId:gt,getWardleyData:yt,clear:ut,setAccTitle:Xt,getAccTitle:At,setDiagramTitle:Lt,getDiagramTitle:zt,getAccDescription:Tt,setAccDescription:Nt},qt=["Genesis","Custom Built","Product","Commodity"],Ht=u(()=>{const{themeVariables:o}=V();return{backgroundColor:o.wardley?.backgroundColor??o.background??"#fff",axisColor:o.wardley?.axisColor??"#000",axisTextColor:o.wardley?.axisTextColor??o.primaryTextColor??"#222",gridColor:o.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:o.wardley?.componentFill??"#fff",componentStroke:o.wardley?.componentStroke??"#000",componentLabelColor:o.wardley?.componentLabelColor??o.primaryTextColor??"#222",linkStroke:o.wardley?.linkStroke??"#000",evolutionStroke:o.wardley?.evolutionStroke??"#dc3545",annotationStroke:o.wardley?.annotationStroke??"#000",annotationTextColor:o.wardley?.annotationTextColor??o.primaryTextColor??"#222",annotationFill:o.wardley?.annotationFill??o.background??"#fff"}},"getTheme"),jt=u(()=>{const o=V()["wardley-beta"];return{width:o?.width??900,height:o?.height??600,padding:o?.padding??48,nodeRadius:o?.nodeRadius??6,nodeLabelOffset:o?.nodeLabelOffset??8,axisFontSize:o?.axisFontSize??12,labelFontSize:o?.labelFontSize??10,showGrid:o?.showGrid??!1,useMaxWidth:o?.useMaxWidth??!0}},"getConfigValues"),Vt=u((o,r,e,h)=>{K.debug(`Rendering Wardley map
|
|
2
2
|
`+o);const a=jt(),d=Ht(),w=a.nodeRadius*1.6,C=h.db,g=C.getWardleyData(),O=C.getDiagramTitle(),S=g.size?.width??a.width,b=g.size?.height??a.height,Y=It(r);Y.selectAll("*").remove(),Bt(Y,b,S,a.useMaxWidth),Y.attr("viewBox",`0 0 ${S} ${b}`);const v=Y.append("g").attr("class","wardley-map"),q=Y.append("defs");q.append("marker").attr("id",`arrow-${r}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.evolutionStroke).attr("stroke","none"),q.append("marker").attr("id",`link-arrow-end-${r}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.linkStroke).attr("stroke","none"),q.append("marker").attr("id",`link-arrow-start-${r}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",d.linkStroke).attr("stroke","none"),v.append("rect").attr("class","wardley-background").attr("width",S).attr("height",b).attr("fill",d.backgroundColor);const I=S-a.padding*2,B=b-a.padding*2;O&&v.append("text").attr("class","wardley-title").attr("x",S/2).attr("y",a.padding/2).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(O);const T=u(t=>a.padding+t/100*I,"projectX"),z=u(t=>b-a.padding-t/100*B,"projectY"),R=v.append("g").attr("class","wardley-axes");R.append("line").attr("x1",a.padding).attr("x2",S-a.padding).attr("y1",b-a.padding).attr("y2",b-a.padding).attr("stroke",d.axisColor).attr("stroke-width",1),R.append("line").attr("x1",a.padding).attr("x2",a.padding).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const wt=g.axes.xLabel??"Evolution",mt=g.axes.yLabel??"Visibility";R.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",a.padding+I/2).attr("y",b-a.padding/4).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(wt),R.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",a.padding/3).attr("y",a.padding+B/2).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${a.padding/3} ${a.padding+B/2})`).text(mt);const F=g.axes.stages&&g.axes.stages.length>0?g.axes.stages:qt;if(F.length>0){const t=v.append("g").attr("class","wardley-stages"),s=g.axes.stageBoundaries,n=[];if(s&&s.length===F.length){let i=0;s.forEach(p=>{n.push({start:i,end:p}),i=p})}else{const i=1/F.length;F.forEach((p,l)=>{n.push({start:l*i,end:(l+1)*i})})}F.forEach((i,p)=>{const l=n[p],f=a.padding+l.start*I,x=a.padding+l.end*I,y=(f+x)/2;p>0&&t.append("line").attr("x1",f).attr("x2",f).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",y).attr("y",b-a.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize-2).attr("text-anchor","middle").text(i)})}if(a.showGrid){const t=v.append("g").attr("class","wardley-grid");for(let s=1;s<4;s++){const n=s/4,i=a.padding+I*n;t.append("line").attr("x1",i).attr("x2",i).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",a.padding).attr("x2",S-a.padding).attr("y1",b-a.padding-B*n).attr("y2",b-a.padding-B*n).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const c=new Map;if(g.nodes.forEach(t=>{c.set(t.id,{x:T(t.x),y:z(t.y),node:t})}),g.pipelines.length>0){const t=v.append("g").attr("class","wardley-pipelines"),s=v.append("g").attr("class","wardley-pipeline-links");g.pipelines.forEach(n=>{if(n.componentIds.length===0)return;const i=n.componentIds.map(x=>({id:x,pos:c.get(x),node:g.nodes.find(y=>y.id===x)})).filter(x=>x.pos&&x.node).sort((x,y)=>x.node.x-y.node.x);for(let x=0;x<i.length-1;x++){const y=i[x],m=i[x+1];s.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",y.pos.x).attr("y1",y.pos.y).attr("x2",m.pos.x).attr("y2",m.pos.y).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let p=1/0,l=-1/0,f=0;if(n.componentIds.forEach(x=>{const y=c.get(x);y&&(p=Math.min(p,y.x),l=Math.max(l,y.x),f=y.y)}),p!==1/0&&l!==-1/0){const y=a.nodeRadius*4,m=f-y/2,P=c.get(n.nodeId);if(P){const N=(p+l)/2;P.x=N,P.y=m-w/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",p-15).attr("y",m).attr("width",l-p+30).attr("height",y).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const _=v.append("g").attr("class","wardley-links"),Z=new Map;g.pipelines.forEach(t=>{Z.set(t.nodeId,new Set(t.componentIds))});const Q=g.links.filter(t=>!(!c.has(t.source)||!c.has(t.target)||Z.get(t.target)?.has(t.source)));_.selectAll("line").data(Q).enter().append("line").attr("class",t=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",t=>{const s=c.get(t.source),n=c.get(t.target),p=g.nodes.find(y=>y.id===t.source).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=n.x-s.x,f=n.y-s.y,x=Math.sqrt(l*l+f*f);return s.x+l/x*p}).attr("y1",t=>{const s=c.get(t.source),n=c.get(t.target),p=g.nodes.find(y=>y.id===t.source).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=n.x-s.x,f=n.y-s.y,x=Math.sqrt(l*l+f*f);return s.y+f/x*p}).attr("x2",t=>{const s=c.get(t.source),n=c.get(t.target),p=g.nodes.find(y=>y.id===t.target).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=s.x-n.x,f=s.y-n.y,x=Math.sqrt(l*l+f*f);return n.x+l/x*p}).attr("y2",t=>{const s=c.get(t.source),n=c.get(t.target),p=g.nodes.find(y=>y.id===t.target).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=s.x-n.x,f=s.y-n.y,x=Math.sqrt(l*l+f*f);return n.y+f/x*p}).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>t.flow==="forward"||t.flow==="bidirectional"?`url(#link-arrow-end-${r})`:null).attr("marker-start",t=>t.flow==="backward"||t.flow==="bidirectional"?`url(#link-arrow-start-${r})`:null),_.selectAll("text").data(Q.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const s=c.get(t.source),n=c.get(t.target),i=(s.x+n.x)/2,p=n.y-s.y,l=n.x-s.x,f=Math.sqrt(l*l+p*p),x=8,y=p/f;return i+y*x}).attr("y",t=>{const s=c.get(t.source),n=c.get(t.target),i=(s.y+n.y)/2,p=n.x-s.x,l=n.y-s.y,f=Math.sqrt(p*p+l*l),x=8,y=-p/f;return i+y*x}).attr("fill",d.axisTextColor).attr("font-size",a.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const s=c.get(t.source),n=c.get(t.target),i=(s.x+n.x)/2,p=(s.y+n.y)/2,l=n.x-s.x,f=n.y-s.y,x=Math.sqrt(l*l+f*f),y=8,m=f/x,P=-l/x,N=i+m*y,W=p+P*y;let X=Math.atan2(f,l)*180/Math.PI;return(X>90||X<-90)&&(X+=180),`rotate(${X} ${N} ${W})`}).text(t=>t.label);const kt=v.append("g").attr("class","wardley-trends"),bt=g.trends.map(t=>{const s=c.get(t.nodeId);if(!s)return null;const n=T(t.targetX),i=z(t.targetY),p=n-s.x,l=i-s.y,f=Math.sqrt(p*p+l*l),x=a.nodeRadius+2,y=f>x?n-p/f*x:n,m=f>x?i-l/f*x:i;return{origin:s,targetX:n,targetY:i,adjustedX2:y,adjustedY2:m}}).filter(t=>t!==null);kt.selectAll("line").data(bt).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",d.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${r})`);const M=v.append("g").attr("class","wardley-nodes").selectAll("g").data(g.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));M.filter(t=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const L=M.filter(t=>t.sourceStrategy==="market");L.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>!t.isPipelineParent&&t.sourceStrategy!=="market"&&t.className!=="anchor").append("circle").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const H=a.nodeRadius*.7,$=a.nodeRadius*1.2;if(L.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x).attr("y1",t=>c.get(t.id).y-$).attr("x2",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),L.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),L.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x).attr("y2",t=>c.get(t.id).y-$).attr("stroke",d.componentStroke).attr("stroke-width",1),L.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y-$).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),L.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),L.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),M.filter(t=>t.isPipelineParent===!0).append("rect").attr("x",t=>c.get(t.id).x-w/2).attr("y",t=>c.get(t.id).y-w/2).attr("width",w).attr("height",w).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",t=>{const s=c.get(t.id);let n=t.isPipelineParent?w/2+15:a.nodeRadius+15;return t.sourceStrategy&&(n+=a.nodeRadius+10),s.x+n}).attr("y1",t=>{const s=c.get(t.id),n=t.isPipelineParent?w:a.nodeRadius*2;return s.y-n/2}).attr("x2",t=>{const s=c.get(t.id);let n=t.isPipelineParent?w/2+15:a.nodeRadius+15;return t.sourceStrategy&&(n+=a.nodeRadius+10),s.x+n}).attr("y2",t=>{const s=c.get(t.id),n=t.isPipelineParent?w:a.nodeRadius*2;return s.y+n/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),M.append("text").attr("x",t=>{const s=c.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?s.x+t.labelOffsetX:s.x;let n=a.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetX===void 0&&(n+=10);const i=t.labelOffsetX??n;return s.x+i}).attr("y",t=>{const s=c.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?s.y+t.labelOffsetY:s.y-3;let n=-a.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetY===void 0&&(n-=10);const i=t.labelOffsetY??n;return s.y+i}).attr("class","wardley-node-label").attr("fill",t=>t.className==="evolved"?d.evolutionStroke:t.className==="anchor"?"#000":d.componentLabelColor).attr("font-size",a.labelFontSize).attr("font-weight",t=>t.className==="anchor"?"bold":"normal").attr("text-anchor",t=>t.className==="anchor"?"middle":"start").attr("dominant-baseline",t=>t.className==="anchor"?"middle":"auto").text(t=>t.label),g.annotations.length>0){const t=v.append("g").attr("class","wardley-annotations");if(g.annotations.forEach(s=>{const n=s.coordinates.map(i=>({x:T(i.x),y:z(i.y)}));if(n.length>1)for(let i=0;i<n.length-1;i++)t.append("line").attr("class","wardley-annotation-line").attr("x1",n[i].x).attr("y1",n[i].y).attr("x2",n[i+1].x).attr("y2",n[i+1].y).attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");n.forEach(i=>{const p=t.append("g").attr("class","wardley-annotation");p.append("circle").attr("cx",i.x).attr("cy",i.y).attr("r",10).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5),p.append("text").attr("x",i.x).attr("y",i.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.number)})}),g.annotationsBox){let s=T(g.annotationsBox.x),n=z(g.annotationsBox.y);const i=10,p=16,l=11,f=t.append("g").attr("class","wardley-annotations-box"),x=[...g.annotations].filter(m=>m.text).sort((m,P)=>m.number-P.number),y=[];if(x.forEach((m,P)=>{const N=f.append("text").attr("x",s+i).attr("y",n+i+(P+1)*p).attr("font-size",l).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${m.number}. ${m.text}`);y.push(N)}),y.length>0){let m=0,P=0;y.forEach(j=>{const D=j.node(),Ct=D.getComputedTextLength();m=Math.max(m,Ct);const St=D.getBBox();P=Math.max(P,St.height)});const N=m+i*2+105,W=x.length*p+i*2+P/2,X=a.padding,$t=S-a.padding-N,vt=a.padding,Pt=b-a.padding-W;s=Math.max(X,Math.min(s,$t)),n=Math.max(vt,Math.min(n,Pt)),y.forEach((j,D)=>{j.attr("x",s+i).attr("y",n+i+(D+1)*p)}),f.insert("rect","text").attr("x",s).attr("y",n).attr("width",N).attr("height",W).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(g.notes.length>0){const t=v.append("g").attr("class","wardley-notes");g.notes.forEach(s=>{const n=T(s.x),i=z(s.y);t.append("text").attr("x",n).attr("y",i).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.text)})}if(g.accelerators.length>0){const t=v.append("g").attr("class","wardley-accelerators");g.accelerators.forEach(s=>{const n=T(s.x),i=z(s.y),p=60,l=30,f=20,x=`
|
|
3
3
|
M ${n} ${i-l/2}
|
|
4
4
|
L ${n+p-f} ${i-l/2}
|
package/dist/assets/{xychartDiagram-TAQBALBS-8pBO04wD.js → xychartDiagram-TAQBALBS-YO0UkwUA.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{s as pi,g as mi,x as $t,v as yi,a as bi,b as wi,_ as a,l as Ut,T as Ai,d as Ci,D as Si,O as Dt,j as Ri,Q as Gt,R as _i,V as ki,au as Ti}from"./mermaid.core-
|
|
1
|
+
import{s as pi,g as mi,x as $t,v as yi,a as bi,b as wi,_ as a,l as Ut,T as Ai,d as Ci,D as Si,O as Dt,j as Ri,Q as Gt,R as _i,V as ki,au as Ti}from"./mermaid.core-BgIjIYGw.js";import{i as Di}from"./init-Dmth1JHB.js";import{o as Pi}from"./ordinal-BeghXfj9.js";import{r as vi}from"./range-OtVwhkKS.js";import{l as Xt}from"./linear-ChbPfC31.js";import{l as Yt}from"./step-CkmJJ7wq.js";import"./styles-ezcN4hc0.js";import"./defaultLocale-CzDG__Ur.js";function St(){var e=Pi().unknown(void 0),t=e.domain,i=e.range,s=0,n=1,o,l,p=!1,d=0,u=0,b=.5;delete e.unknown;function A(){var m=t().length,E=n<s,v=E?n:s,L=E?s:n;o=(L-v)/Math.max(1,m-d+u*2),p&&(o=Math.floor(o)),v+=(L-v-o*(m-d))*b,l=o*(1-d),p&&(v=Math.round(v),l=Math.round(l));var M=vi(m).map(function(w){return v+o*w});return i(E?M.reverse():M)}return e.domain=function(m){return arguments.length?(t(m),A()):t()},e.range=function(m){return arguments.length?([s,n]=m,s=+s,n=+n,A()):[s,n]},e.rangeRound=function(m){return[s,n]=m,s=+s,n=+n,p=!0,A()},e.bandwidth=function(){return l},e.step=function(){return o},e.round=function(m){return arguments.length?(p=!!m,A()):p},e.padding=function(m){return arguments.length?(d=Math.min(1,u=+m),A()):d},e.paddingInner=function(m){return arguments.length?(d=Math.min(1,m),A()):d},e.paddingOuter=function(m){return arguments.length?(u=+m,A()):u},e.align=function(m){return arguments.length?(b=Math.max(0,Math.min(1,m)),A()):b},e.copy=function(){return St(t(),[s,n]).round(p).paddingInner(d).paddingOuter(u).align(b)},Di.apply(A(),arguments)}var Rt=(function(){var e=a(function(F,h,g,x){for(g=g||{},x=F.length;x--;g[F[x]]=h);return g},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],n=[1,5],o=[1,6],l=[1,7],p=[1,5,10,12,14,16,18,19,21,23,36,37,38],d=[1,25],u=[1,26],b=[1,28],A=[1,29],m=[1,30],E=[1,31],v=[1,32],L=[1,33],M=[1,34],w=[1,35],D=[1,36],c=[1,37],B=[1,43],W=[1,42],X=[1,47],Y=[1,50],k=[1,10,12,14,16,18,19,21,23,36,37,38],H=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],S=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],R=[1,65],O=[26,28],T={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:a(function(h,g,x,f,_,r,lt){var y=r.length-1;switch(_){case 5:f.setOrientation(r[y]);break;case 9:f.setDiagramTitle(r[y].text.trim());break;case 12:f.setLineData({text:"",type:"text"},r[y]);break;case 13:f.setLineData(r[y-1],r[y]);break;case 14:f.setBarData({text:"",type:"text"},r[y]);break;case 15:f.setBarData(r[y-1],r[y]);break;case 16:this.$=r[y].trim(),f.setAccTitle(this.$);break;case 17:case 18:this.$=r[y].trim(),f.setAccDescription(this.$);break;case 19:this.$=r[y-1];break;case 20:case 30:this.$=[r[y-2],...r[y]];break;case 21:case 31:this.$=[r[y]];break;case 22:this.$={value:Number(r[y-1]),label:r[y]};break;case 23:this.$={value:Number(r[y]),label:""};break;case 24:f.setXAxisTitle(r[y]);break;case 25:f.setXAxisTitle(r[y-1]);break;case 26:f.setXAxisTitle({type:"text",text:""});break;case 27:f.setXAxisBand(r[y]);break;case 28:f.setXAxisRangeData(Number(r[y-2]),Number(r[y]));break;case 29:this.$=r[y-1];break;case 32:f.setYAxisTitle(r[y]);break;case 33:f.setYAxisTitle(r[y-1]);break;case 34:f.setYAxisTitle({type:"text",text:""});break;case 35:f.setYAxisRangeData(Number(r[y-2]),Number(r[y]));break;case 39:this.$={text:r[y],type:"text"};break;case 40:this.$={text:r[y],type:"text"};break;case 41:this.$={text:r[y],type:"markdown"};break;case 42:this.$=r[y];break;case 43:this.$=r[y-1]+""+r[y];break}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,36:n,37:o,38:l}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,36:n,37:o,38:l}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],36:n,37:o,38:l}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(p,[2,36]),e(p,[2,37]),e(p,[2,38]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,36:n,37:o,38:l}),{1:[2,3]},e(p,[2,5]),e(t,[2,7],{4:22,36:n,37:o,38:l}),{11:23,30:d,39:24,40:u,41:27,42:b,43:A,44:m,45:E,46:v,47:L,48:M,49:w,50:D,51:c},{11:39,13:38,24:B,29:W,30:d,31:40,32:41,39:24,40:u,41:27,42:b,43:A,44:m,45:E,46:v,47:L,48:M,49:w,50:D,51:c},{11:45,15:44,29:X,30:d,35:46,39:24,40:u,41:27,42:b,43:A,44:m,45:E,46:v,47:L,48:M,49:w,50:D,51:c},{11:49,17:48,24:Y,30:d,39:24,40:u,41:27,42:b,43:A,44:m,45:E,46:v,47:L,48:M,49:w,50:D,51:c},{11:52,17:51,24:Y,30:d,39:24,40:u,41:27,42:b,43:A,44:m,45:E,46:v,47:L,48:M,49:w,50:D,51:c},{20:[1,53]},{22:[1,54]},e(k,[2,18]),{1:[2,2]},e(k,[2,8]),e(k,[2,9]),e(H,[2,39],{41:55,42:b,43:A,44:m,45:E,46:v,47:L,48:M,49:w,50:D,51:c}),e(H,[2,40]),e(H,[2,41]),e(S,[2,42]),e(S,[2,44]),e(S,[2,45]),e(S,[2,46]),e(S,[2,47]),e(S,[2,48]),e(S,[2,49]),e(S,[2,50]),e(S,[2,51]),e(S,[2,52]),e(S,[2,53]),e(k,[2,10]),e(k,[2,24],{32:41,31:56,24:B,29:W}),e(k,[2,26]),e(k,[2,27]),{33:[1,57]},{11:59,30:d,34:58,39:24,40:u,41:27,42:b,43:A,44:m,45:E,46:v,47:L,48:M,49:w,50:D,51:c},e(k,[2,11]),e(k,[2,32],{35:60,29:X}),e(k,[2,34]),{33:[1,61]},e(k,[2,12]),{17:62,24:Y},{25:63,27:64,29:R},e(k,[2,14]),{17:66,24:Y},e(k,[2,16]),e(k,[2,17]),e(S,[2,43]),e(k,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},e(k,[2,33]),{29:[1,70]},e(k,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},e(O,[2,23],{30:[1,73]}),e(k,[2,15]),e(k,[2,28]),e(k,[2,29]),{11:59,30:d,34:74,39:24,40:u,41:27,42:b,43:A,44:m,45:E,46:v,47:L,48:M,49:w,50:D,51:c},e(k,[2,35]),e(k,[2,19]),{25:75,27:64,29:R},e(O,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:a(function(h,g){if(g.recoverable)this.trace(h);else{var x=new Error(h);throw x.hash=g,x}},"parseError"),parse:a(function(h){var g=this,x=[0],f=[],_=[null],r=[],lt=this.table,y="",dt=0,Ot=0,ui=2,Vt=1,di=r.slice.call(arguments,1),P=Object.create(this.lexer),$={yy:{}};for(var bt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,bt)&&($.yy[bt]=this.yy[bt]);P.setInput(h,$.yy),$.yy.lexer=P,$.yy.parser=this,typeof P.yylloc>"u"&&(P.yylloc={});var wt=P.yylloc;r.push(wt);var xi=P.options&&P.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function fi(z){x.length=x.length-2*z,_.length=_.length-z,r.length=r.length-z}a(fi,"popStack");function Wt(){var z;return z=f.pop()||P.lex()||Vt,typeof z!="number"&&(z instanceof Array&&(f=z,z=f.pop()),z=g.symbols_[z]||z),z}a(Wt,"lex");for(var I,U,V,At,j={},xt,N,Ft,ft;;){if(U=x[x.length-1],this.defaultActions[U]?V=this.defaultActions[U]:((I===null||typeof I>"u")&&(I=Wt()),V=lt[U]&<[U][I]),typeof V>"u"||!V.length||!V[0]){var Ct="";ft=[];for(xt in lt[U])this.terminals_[xt]&&xt>ui&&ft.push("'"+this.terminals_[xt]+"'");P.showPosition?Ct="Parse error on line "+(dt+1)+`:
|
|
2
2
|
`+P.showPosition()+`
|
|
3
3
|
Expecting `+ft.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Ct="Parse error on line "+(dt+1)+": Unexpected "+(I==Vt?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Ct,{text:P.match,token:this.terminals_[I]||I,line:P.yylineno,loc:wt,expected:ft})}if(V[0]instanceof Array&&V.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+I);switch(V[0]){case 1:x.push(I),_.push(P.yytext),r.push(P.yylloc),x.push(V[1]),I=null,Ot=P.yyleng,y=P.yytext,dt=P.yylineno,wt=P.yylloc;break;case 2:if(N=this.productions_[V[1]][1],j.$=_[_.length-N],j._$={first_line:r[r.length-(N||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(N||1)].first_column,last_column:r[r.length-1].last_column},xi&&(j._$.range=[r[r.length-(N||1)].range[0],r[r.length-1].range[1]]),At=this.performAction.apply(j,[y,Ot,dt,$.yy,V[1],_,r].concat(di)),typeof At<"u")return At;N&&(x=x.slice(0,-1*N*2),_=_.slice(0,-1*N),r=r.slice(0,-1*N)),x.push(this.productions_[V[1]][0]),_.push(j.$),r.push(j._$),Ft=lt[x[x.length-2]][x[x.length-1]],x.push(Ft);break;case 3:return!0}}return!0},"parse")},ht=(function(){var F={EOF:1,parseError:a(function(g,x){if(this.yy.parser)this.yy.parser.parseError(g,x);else throw new Error(g)},"parseError"),setInput:a(function(h,g){return this.yy=g||this.yy||{},this._input=h,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var g=h.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:a(function(h){var g=h.length,x=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var f=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),x.length-1&&(this.yylineno-=x.length-1);var _=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:x?(x.length===f.length?this.yylloc.first_column:0)+f[f.length-x.length].length-x[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(h){this.unput(this.match.slice(h))},"less"),pastInput:a(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var h=this.pastInput(),g=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
|
package/dist/index.html
CHANGED
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
|
|
26
26
|
<link rel="manifest" href="/manifest.webmanifest" />
|
|
27
27
|
<title>Limix Bot</title>
|
|
28
|
-
<script type="module" crossorigin src="/assets/index-
|
|
29
|
-
<link rel="modulepreload" crossorigin href="/assets/styles-
|
|
28
|
+
<script type="module" crossorigin src="/assets/index-1nLJcLwH.js"></script>
|
|
29
|
+
<link rel="modulepreload" crossorigin href="/assets/styles-ezcN4hc0.js">
|
|
30
30
|
<link rel="stylesheet" crossorigin href="/assets/styles-D55d5vt1.css">
|
|
31
31
|
</head>
|
|
32
32
|
<body>
|
package/dist/rail.html
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>MausBot</title>
|
|
7
|
-
<script type="module" crossorigin src="/assets/rail-
|
|
8
|
-
<link rel="modulepreload" crossorigin href="/assets/styles-
|
|
9
|
-
<link rel="modulepreload" crossorigin href="/assets/monitor-
|
|
10
|
-
<link rel="modulepreload" crossorigin href="/assets/PlacesRail-
|
|
7
|
+
<script type="module" crossorigin src="/assets/rail-C9Rg-ai8.js"></script>
|
|
8
|
+
<link rel="modulepreload" crossorigin href="/assets/styles-ezcN4hc0.js">
|
|
9
|
+
<link rel="modulepreload" crossorigin href="/assets/monitor-DwKv3TJO.js">
|
|
10
|
+
<link rel="modulepreload" crossorigin href="/assets/PlacesRail-BesUMTCh.js">
|
|
11
11
|
<link rel="stylesheet" crossorigin href="/assets/styles-D55d5vt1.css">
|
|
12
12
|
</head>
|
|
13
13
|
<body>
|
package/dist-server/index.js
CHANGED
|
@@ -20801,18 +20801,18 @@ ell the person plainly. ${bringTogether(place2,self2,"bot")}`}function mentionsO
|
|
|
20801
20801
|
if(kept2!==void 0)return kept2;try{let parsed3=storedSchema.safeParse(JSON.parse(readFileSync57(file2,"utf8")));kept2=parsed3.success?parsed3.data:null}catch{kept2=null}return kept2},where2=bot=>{let wanted=fold2(bot);if(!wanted)return null;for(let place2 of read4()?.places??[]){let found2=place2.bots.find(candidate=>fold2(candidate)===wanted);if(found2)return{bot:found2,place:place2}}return null};return{read:read4,write(input2){let next={...input2,at:now2()};return writeFileAtomic(file2,JSON.stringify(
|
|
20802
20802
|
next),{mode:384}),kept2=next,next},explain(bot){let known=read4();if(!known)return{hint:ONE_PLACE};let found2=where2(bot);return found2?{where:livesElsewhere(found2.bot,found2.place,known.self)}:null},mentioned(text33,here){let known=read4();return known?mentionsOf(known,text33,here).map(({bot,place:place2})=>` The user named @${bot}, a bot of theirs that is not here: ${livesElsewhere(bot,place2,known.self)}`).join(""):""},missed(text33,here){let known=read4();return known?mentionsOf(known,text33,
|
|
20803
20803
|
here).map(({bot,place:place2})=>`${bot} lives ${place2.kind==="team"?"in":"on"} ${place2.name}, so that mention didn't reach it: bots work together only within one place. ${bringTogether(place2,known.self,"person")}`):[]}}}var PATH="/api/places/elsewhere";function createPlacesElsewhereRoutes({elsewhere,owner:owner2}){return async({req,res,path:path8,method:method2,auth,json:json7,readBody:readBody2})=>{if(path8!==PATH)return PASS;if(res.setHeader("cache-control","no-store"),!owner2(auth))return req.resume(),json7(res,403,{error:"Only this place's owner can say where their other bots live."});if(method2==="GET")return json7(res,200,elsewhere.read()??{v:1,places:[]});if(method2!=="PUT")return json7(res,405,{error:"m\
|
|
20804
|
-
ethod not allowed"});let body3=elsewhereSchema.safeParse(await readBody2(req,256*1024));return body3.success?(elsewhere.write(body3.data),json7(res,200,{ok:!0})):json7(res,400,{error:"send { v: 1, self: { name, kind }, places: [{ name, kind, bots }] }"})}}import{existsSync as existsSync31}from"node:fs";function assertRoomFolder(cwd){if(cwd&&!existsSync31(cwd))throw new Error(`This room's working folder no longer exists: ${cwd}. Create that folder again: a room keeps the folder it started in.`)}init_zod();import{readFileSync as readFileSync58,rmSync as rmSync25}from"node:fs";import{join as join74}from"node:path";var TOKEN3=/^[0-9a-f]{64}$/,DEFAULT_MANAGED_COMPOSIO_BROKER_URL="https://
|
|
20805
|
-
let loopback2=["localhost","127.0.0.1","[::1]"].includes(parsed3.hostname);return parsed3.protocol!=="https:"&&!(parsed3.protocol==="http:"&&loopback2)?"":`${parsed3.origin}${parsed3.pathname.replace(/\/+$/,"")}`}function managedComposioAccess(brokerUrl2,credentials){if(managedComposioBrokerOff())return null;let url3=normalizeManagedComposioBrokerUrl(brokerUrl2),token3=credentials?.composioBrokerToken;return!url3||!TOKEN3.test(token3??"")?null:{url:url3,token:token3}}async function ensureManagedComposioCredentials({brokerUrl:brokerUrl2,credentials,fetchImpl=globalThis.fetch,saveCredentials,log:log7=()=>{},timeoutSignal=milliseconds2=>AbortSignal.timeout(milliseconds2),existingCredentialTimeoutMs=8e3,registrationTimeoutMs=15e3}){if(managedComposioBrokerOff())return credentials;let url3=normalizeManagedComposioBrokerUrl(brokerUrl2);if(!url3)return brokerUrl2&&log7("connected-apps broker URL rejected: HTTPS or a loopback HTTP URL is required"),credentials;if(
|
|
20806
|
-
|
|
20807
|
-
|
|
20808
|
-
installation registered")}catch(error66){log7(`connected-apps registration failed: ${error66?.message??error66}`)}return credentials}init_atomic();var CLOUD_CONNECTED_APPS_FILE="connected-apps-installation.json",CLOUD_CONNECTED_APPS_RETRY_MS=[3e4,6e4,12e4,3e5,6e5,18e5],OWN_KEY_CHECK_MS=6e4,TOKEN4=/^[0-9a-f]{64}$/,storedSchema2=external_exports.object({version:external_exports.number(),brokerUrl:external_exports.string(),installationId:external_exports.string().min(1),token:external_exports.string().regex(TOKEN4)});function readStored(file2,brokerUrl2){let raw;try{raw=readFileSync58(file2,"utf8")}catch(error66){return error66.code==="ENOENT"?
|
|
20804
|
+
ethod not allowed"});let body3=elsewhereSchema.safeParse(await readBody2(req,256*1024));return body3.success?(elsewhere.write(body3.data),json7(res,200,{ok:!0})):json7(res,400,{error:"send { v: 1, self: { name, kind }, places: [{ name, kind, bots }] }"})}}import{existsSync as existsSync31}from"node:fs";function assertRoomFolder(cwd){if(cwd&&!existsSync31(cwd))throw new Error(`This room's working folder no longer exists: ${cwd}. Create that folder again: a room keeps the folder it started in.`)}init_zod();import{readFileSync as readFileSync58,rmSync as rmSync25}from"node:fs";import{join as join74}from"node:path";var TOKEN3=/^[0-9a-f]{64}$/,DEFAULT_MANAGED_COMPOSIO_BROKER_URL="https://composio.limixmedia.com";function managedComposioBrokerOff(environment=process.env){return/^(off|0|false|no)$/i.test(environment.OMB_COMPOSIO_BROKER?.trim()??"")}function managedComposioBrokerUrl(configured2,shipped){if(managedComposioBrokerOff())return"";let explicit=typeof configured2=="string"?configured2.trim():"";return normalizeManagedComposioBrokerUrl(explicit||(shipped?DEFAULT_MANAGED_COMPOSIO_BROKER_URL:""))}function normalizeManagedComposioBrokerUrl(value3){if(typeof value3!="string"||!value3.trim())return"";let parsed3;try{parsed3=new URL(value3.trim())}catch{return""}if(parsed3.username||parsed3.password||parsed3.search||parsed3.hash)return"";
|
|
20805
|
+
let loopback2=["localhost","127.0.0.1","[::1]"].includes(parsed3.hostname);return parsed3.protocol!=="https:"&&!(parsed3.protocol==="http:"&&loopback2)?"":`${parsed3.origin}${parsed3.pathname.replace(/\/+$/,"")}`}function managedComposioAccess(brokerUrl2,credentials){if(managedComposioBrokerOff())return null;let url3=normalizeManagedComposioBrokerUrl(brokerUrl2),token3=credentials?.composioBrokerToken;return!url3||credentials?.composioBrokerUrl!==url3||!TOKEN3.test(token3??"")?null:{url:url3,token:token3}}async function ensureManagedComposioCredentials({brokerUrl:brokerUrl2,credentials,fetchImpl=globalThis.fetch,saveCredentials,log:log7=()=>{},timeoutSignal=milliseconds2=>AbortSignal.timeout(milliseconds2),existingCredentialTimeoutMs=8e3,registrationTimeoutMs=15e3}){if(managedComposioBrokerOff())return credentials;let url3=normalizeManagedComposioBrokerUrl(brokerUrl2);if(!url3)return brokerUrl2&&log7("connected-apps broker URL rejected: HTTPS or a loopback HTTP URL is required"),credentials;if(managedComposioAccess(
|
|
20806
|
+
url3,credentials))try{let check4=await fetchImpl(`${url3}/v1/me`,{headers:{authorization:`Bearer ${credentials.composioBrokerToken}`},redirect:"error",signal:timeoutSignal(existingCredentialTimeoutMs)});if(check4.ok||check4.status!==401)return credentials;delete credentials.composioBrokerToken,delete credentials.composioInstallationId}catch{return credentials}try{let response=await fetchImpl(`${url3}/v1/installations`,{method:"POST",headers:{"content-type":"application/json"},body:"{}",redirect:"\
|
|
20807
|
+
error",signal:timeoutSignal(registrationTimeoutMs)}),body3=await response.json().catch(()=>null);if(!response.ok)throw new Error(body3?.error||`HTTP ${response.status}`);if(!TOKEN3.test(body3?.token??"")||typeof body3?.installationId!="string")throw new Error("the connected-apps service returned invalid credentials");credentials.composioBrokerUrl=url3,credentials.composioBrokerToken=body3.token,credentials.composioInstallationId=body3.installationId,await saveCredentials(credentials),log7("conne\
|
|
20808
|
+
cted-apps installation registered")}catch(error66){log7(`connected-apps registration failed: ${error66?.message??error66}`)}return credentials}init_atomic();var CLOUD_CONNECTED_APPS_FILE="connected-apps-installation.json",CLOUD_CONNECTED_APPS_RETRY_MS=[3e4,6e4,12e4,3e5,6e5,18e5],OWN_KEY_CHECK_MS=6e4,TOKEN4=/^[0-9a-f]{64}$/,storedSchema2=external_exports.object({version:external_exports.number(),brokerUrl:external_exports.string(),installationId:external_exports.string().min(1),token:external_exports.string().regex(TOKEN4)});function readStored(file2,brokerUrl2){let raw;try{raw=readFileSync58(file2,"utf8")}catch(error66){return error66.code==="ENOENT"?
|
|
20809
20809
|
{kind:"none"}:{kind:"kept",why:`it could not be read (${error66.code??"error"})`}}let value3;try{value3=JSON.parse(raw)}catch{return{kind:"none"}}let parsed3=storedSchema2.safeParse(value3);if(!parsed3.success){let version5=value3?.version;return typeof version5=="number"&&version5!==1?{kind:"kept",why:`it is version ${version5}`}:{kind:"none"}}return parsed3.data.version!==1?{kind:"kept",why:`it is version ${parsed3.data.version}`}:parsed3.data.brokerUrl!==brokerUrl2?{kind:"none"}:{kind:"held",
|
|
20810
|
-
credentials:{composioBrokerToken:parsed3.data.token,composioInstallationId:parsed3.data.installationId}}}function startCloudConnectedApps(options2){let file2=join74(options2.dataDir,CLOUD_CONNECTED_APPS_FILE),log7=options2.log??(()=>{}),delays=options2.retryDelaysMs??CLOUD_CONNECTED_APPS_RETRY_MS,random2=options2.random??Math.random,setTimer=options2.setTimer??((run12,ms2)=>setTimeout(run12,ms2)),clearTimer2=options2.clearTimer??(timer5=>clearTimeout(timer5)),failures=0,
|
|
20811
|
-
current3=Promise.resolve(),grant=options2.cloudGrant?.trim()||void 0,apply3=access2=>{let token3=access2?.token??null;if(!(stopped||token3===applied)){applied=token3;try{options2.apply(access2)}catch(error66){log7(`connected apps: ${error66 instanceof Error?error66.message:String(error66)}`)}}},retryAfter=ms2=>{timer4=setTimer(()=>{timer4=null,current3=attempt2()},ms2),timer4.unref?.()},retryLater=()=>{if(stopped)return;let base2=delays[Math.min(failures,delays.length-
|
|
20812
|
-
Math.round(base2*(1+.2*random2())))},presentGrant=async access2=>{let status5;try{let response=await(options2.fetchImpl??globalThis.fetch)(`${access2.url}/v1/installation/cloud`,{method:"PUT",headers:{authorization:`Bearer ${access2.token}`,"content-type":"application/json"},body:JSON.stringify({grant}),redirect:"error",signal:AbortSignal.timeout(15e3)});status5=response.status,await response.text().catch(()=>"")}catch(error66){return log7(`connected apps: the
|
|
20813
|
-
Error?error66.message:String(error66)}); trying again later`),!1}return status5>=500?(log7(`connected apps: the Cloud plan could not be confirmed (HTTP ${status5}); trying again later`),!1):(log7(status5<300?"connected apps: Cloud plan confirmed":`connected apps: the service did not take this Cloud's grant (HTTP ${status5})`),!0)},attempt2=async()=>{try{if(options2.ownKey?.()){stopped||retryAfter(OWN_KEY_CHECK_MS);return}let stored2=readStored(
|
|
20814
|
-
log7(`connected apps: ${CLOUD_CONNECTED_APPS_FILE} is left as it is, since ${stored2.why}; trying again later`),retryLater();return}let credentials=stored2.kind==="held"?{...stored2.credentials}:{},held4=credentials.composioBrokerToken,saved;await ensureManagedComposioCredentials({brokerUrl:options2.brokerUrl,credentials,fetchImpl:options2.fetchImpl,saveCredentials:next=>{writeFileAtomic(file2,`${JSON.stringify({version:1,brokerUrl:options2.brokerUrl,
|
|
20815
|
-
composioBrokerToken},null,2)}
|
|
20810
|
+
credentials:{composioBrokerUrl:brokerUrl2,composioBrokerToken:parsed3.data.token,composioInstallationId:parsed3.data.installationId}}}function startCloudConnectedApps(options2){let file2=join74(options2.dataDir,CLOUD_CONNECTED_APPS_FILE),log7=options2.log??(()=>{}),delays=options2.retryDelaysMs??CLOUD_CONNECTED_APPS_RETRY_MS,random2=options2.random??Math.random,setTimer=options2.setTimer??((run12,ms2)=>setTimeout(run12,ms2)),clearTimer2=options2.clearTimer??(timer5=>clearTimeout(timer5)),failures=0,
|
|
20811
|
+
timer4=null,stopped=!1,applied,current3=Promise.resolve(),grant=options2.cloudGrant?.trim()||void 0,apply3=access2=>{let token3=access2?.token??null;if(!(stopped||token3===applied)){applied=token3;try{options2.apply(access2)}catch(error66){log7(`connected apps: ${error66 instanceof Error?error66.message:String(error66)}`)}}},retryAfter=ms2=>{timer4=setTimer(()=>{timer4=null,current3=attempt2()},ms2),timer4.unref?.()},retryLater=()=>{if(stopped)return;let base2=delays[Math.min(failures,delays.length-
|
|
20812
|
+
1)]??18e5;failures+=1,retryAfter(Math.round(base2*(1+.2*random2())))},presentGrant=async access2=>{let status5;try{let response=await(options2.fetchImpl??globalThis.fetch)(`${access2.url}/v1/installation/cloud`,{method:"PUT",headers:{authorization:`Bearer ${access2.token}`,"content-type":"application/json"},body:JSON.stringify({grant}),redirect:"error",signal:AbortSignal.timeout(15e3)});status5=response.status,await response.text().catch(()=>"")}catch(error66){return log7(`connected apps: the Cl\
|
|
20813
|
+
oud plan could not be confirmed (${error66 instanceof Error?error66.message:String(error66)}); trying again later`),!1}return status5>=500?(log7(`connected apps: the Cloud plan could not be confirmed (HTTP ${status5}); trying again later`),!1):(log7(status5<300?"connected apps: Cloud plan confirmed":`connected apps: the service did not take this Cloud's grant (HTTP ${status5})`),!0)},attempt2=async()=>{try{if(options2.ownKey?.()){stopped||retryAfter(OWN_KEY_CHECK_MS);return}let stored2=readStored(
|
|
20814
|
+
file2,options2.brokerUrl);if(stored2.kind==="kept"){log7(`connected apps: ${CLOUD_CONNECTED_APPS_FILE} is left as it is, since ${stored2.why}; trying again later`),retryLater();return}let credentials=stored2.kind==="held"?{...stored2.credentials}:{},held4=credentials.composioBrokerToken,saved;await ensureManagedComposioCredentials({brokerUrl:options2.brokerUrl,credentials,fetchImpl:options2.fetchImpl,saveCredentials:next=>{writeFileAtomic(file2,`${JSON.stringify({version:1,brokerUrl:options2.brokerUrl,
|
|
20815
|
+
installationId:next.composioInstallationId,token:next.composioBrokerToken},null,2)}
|
|
20816
20816
|
`,{mode:384}),saved=next.composioBrokerToken},log:line6=>log7(line6)});let token3=credentials.composioBrokerToken,usable=typeof token3=="string"&&(token3===held4||token3===saved);held4&&token3!==held4&&!usable&&rmSync25(file2,{force:!0});let access2=usable?managedComposioAccess(options2.brokerUrl,credentials):null;apply3(access2),usable&&(!access2||!grant||await presentGrant(access2))?failures=0:retryLater()}catch(error66){log7(`connected apps: ${error66 instanceof Error?error66.message:String(error66)}`),
|
|
20817
20817
|
retryLater()}},stored=readStored(file2,options2.brokerUrl);return apply3(stored.kind==="held"?managedComposioAccess(options2.brokerUrl,stored.credentials):null),current3=attempt2(),{settled:()=>current3,stop:()=>{stopped=!0,timer4&&clearTimer2(timer4),timer4=null}}}var cloudHome=null,cloudConnectedAppsBrokerUrl=()=>managedComposioBrokerUrl(process.env.OMB_COMPOSIO_BROKER_URL,!import.meta.url.endsWith(".ts"));function startCloudHomeConnectedApps(input2){if(!input2.cloudHome||cloudHome)return;if(managedComposioBrokerOff()){
|
|
20818
20818
|
console.log("cloud home: the connected-apps service is switched off (OMB_COMPOSIO_BROKER)");return}let configured2=process.env.OMB_COMPOSIO_BROKER_URL,brokerUrl2=cloudConnectedAppsBrokerUrl();if(!brokerUrl2){configured2?.trim()&&console.warn("cloud home: connected-apps service URL rejected: HTTPS or a loopback HTTP URL is required");return}cloudHome=startCloudConnectedApps({dataDir:input2.dataDir,brokerUrl:brokerUrl2,apply:input2.apply,cloudGrant:input2.cloudGrant,ownKey:input2.ownKey,log:line6=>console.
|
|
@@ -20947,18 +20947,18 @@ record31])=>[person2,{email:record31.email,userId:record31.userId,again:!0}]))};
|
|
|
20947
20947
|
({sessionId})=>{let file2=this.projectApps(apiKey),own4=file2.people[person2];!own4||own4.userId!==record31.userId||(file2.people[person2]={...own4,sessionId},this.write("project-apps.json",file2))})),composio.apiKey=apiKey,{composio}}async ensureProjectAccess(person2,email3,apiKey){let userId=memberComposioUser(this.options.teamId,person2);this.projectApps(apiKey).removals.includes(userId)&&await this.removeLeftUser(apiKey,userId);let file2=this.projectApps(apiKey),held4=file2.people[person2];return(!held4||
|
|
20948
20948
|
held4.again)&&(file2.people[person2]={email:email3,userId,...held4?.sessionId?{sessionId:held4.sessionId}:{}},this.write("project-apps.json",file2),this.remember(person2,email3)),this.projectAccess(person2,apiKey)}async removeLeftUser(apiKey,userId){await removeUserConnections(apiKey,userId);let file2=this.projectApps(apiKey);file2.removals.includes(userId)&&(file2.removals=file2.removals.filter(left2=>left2!==userId),this.write("project-apps.json",file2))}async finishRemovals(){let apiKey=this.
|
|
20949
20949
|
projectKey();if(apiKey)for(let userId of this.projectApps(apiKey).removals)await this.removeLeftUser(apiKey,userId).catch(error66=>{console.warn(`[team connections] a member who left still has connections in the team's Composio project (${userId}): ${error66 instanceof Error?error66.message:String(error66)}`)})}appsElsewhere(person2){let apiKey=this.projectKey();if(apiKey){let record31=this.projectApps(apiKey).people[person2];return record31?record31.again===!0:!!this.stored("apps.json",appsSchema)?.
|
|
20950
|
-
people[person2]}return!this.appsAccess(person2)&&!!this.stored("project-apps.json",projectAppsSchema)?.people[person2]}appsLeftOnService(){return this.projectKey()?Object.keys(this.stored("apps.json",appsSchema)?.people??{}).length:0}appsAccess(person2){let apiKey=this.projectKey();return apiKey?this.projectAccess(person2,apiKey):this.serviceAccess(person2)}serviceAccess(person2){let file2=this.apps(),record31=file2.people[person2];return record31?managedComposioAccess(file2.brokerUrl,{
|
|
20951
|
-
token}):null}ensureAppsAccess(person2,email3){if(!PERSON.test(person2))return Promise.resolve(null);let apiKey=this.projectKey();if(apiKey)return this.ensureProjectAccess(person2,email3,apiKey);let held4=this.serviceAccess(person2);if(held4)return Promise.resolve(held4);let brokerUrl2=this.options.brokerUrl();if(!brokerUrl2)return Promise.resolve(null);let pending3=this.registering.get(person2);if(pending3)return pending3;let made=(async()=>(await ensureManagedComposioCredentials(
|
|
20952
|
-
credentials:{},fetchImpl:this.options.fetchImpl,saveCredentials:next=>{if(!next.composioBrokerToken||!next.composioInstallationId)return;let file2=this.apps();file2.people[person2]={email:email3,installationId:next.composioInstallationId,token:next.composioBrokerToken},this.write("apps.json",{...file2,brokerUrl:brokerUrl2}),this.remember(person2,email3)}}),this.serviceAccess(person2)))().finally(()=>this.registering.delete(person2));return this.registering.set(person2,made),
|
|
20953
|
-
projectKey();if(apiKey)return Object.entries(this.projectApps(apiKey).people).flatMap(([person2,record31])=>{let access2=this.projectAccess(person2,apiKey);return access2?[{person:person2,email:record31.email,access:access2}]:[]});let file2=this.apps();return Object.entries(file2.people).flatMap(([person2,record31])=>{let access2=managedComposioAccess(file2.brokerUrl,{composioBrokerToken:record31.token});return access2?[{person:person2,
|
|
20954
|
-
let held4=this.keys().people[person2]?.servers[name6];return held4&&held4.url===url3?held4:null}putKey(person2,email3,name6,key7){if(!PERSON.test(person2))throw new Error("invalid person");let file2=this.keys(),own4=file2.people[person2]??{email:email3,servers:{}};file2.people[person2]={email:email3,servers:{...own4.servers,[name6]:key7}},this.write("mcp-keys.json",file2),this.remember(person2,email3),this.options.onChanged?.(person2,
|
|
20955
|
-
person2,"app",slug3)}deleteKey(person2,name6){let file2=this.keys();file2.people[person2]?.servers[name6]&&(delete file2.people[person2].servers[name6],this.write("mcp-keys.json",file2))}keyPeople(name6,url3){return Object.entries(this.keys().people).flatMap(([person2,record31])=>record31.servers[name6]?.url===url3?[{person:person2,email:record31.email}]:[])}oauth(person2){if(!PERSON.test(person2))throw new Error("invalid person");
|
|
20956
|
-
manager=new McpOAuthManager({file:join76(this.dir,"mcp-oauth",`${person2}.json`),clients:this.options.clients,isOwnerLive:this.options.isOwnerLive,onSettled:(name6,phase,owner2)=>{phase==="succeeded"&&this.options.onChanged?.(person2,"mcp",name6),this.options.onSettled?.(name6,phase,owner2)},...this.options.onRefresh?{onRefresh:(name6,outcome)=>this.options.onRefresh?.(person2,name6,outcome)}:{}}),this.managers.set(person2,
|
|
20957
|
-
name6,url3);return{oauth:this.oauth(person2),...key7?{key:key7}:{}}}liveManagers(){return[...this.managers.values()]}signedInPeople(name6,url3){let folder3=join76(this.dir,"mcp-oauth");return existsSync32(folder3)?readdirSync22(folder3).flatMap(file2=>{let person2=file2.replace(/\.json$/,"");return!PERSON.test(person2)||!file2.endsWith(".json")?[]:this.oauth(person2).authState(name6,url3)==="signed-in"?[{person:person2,email:this.
|
|
20958
|
-
people.json",external_exports.record(external_exports.string(),external_exports.string()),{})[person2]??null}remember(person2,email3){if(!PERSON.test(person2)||!email3)return;let file2=this.read("people.json",external_exports.record(external_exports.string(),external_exports.string()),{});file2[person2]!==email3&&this.write("people.json",{...file2,[person2]:email3})}forgetServer(name6){let file2=this.keys(),changed3=!1;for(let record31 of Object.
|
|
20959
|
-
servers[name6],changed3=!0);changed3&&this.write("mcp-keys.json",file2);let folder3=join76(this.dir,"mcp-oauth");if(existsSync32(folder3))for(let entry2 of readdirSync22(folder3)){let person2=entry2.replace(/\.json$/,"");PERSON.test(person2)&&this.oauth(person2).forget(name6)}}async forgetPerson(person2){let apps3=this.apps();apps3.people[person2]&&(delete apps3.people[person2],this.write("apps.json",apps3));let project3=this.stored(
|
|
20960
|
-
project3&&left2&&(delete project3.people[person2],this.write("project-apps.json",{...project3,removals:[...new Set([...project3.removals,left2.userId])]}),this.projectUsers.delete(person2));let keys5=this.keys();keys5.people[person2]&&(delete keys5.people[person2],this.write("mcp-keys.json",keys5)),this.managers.get(person2)?.dispose(),this.managers.delete(person2),rmSync26(join76(this.dir,"mcp-oauth",`${person2}.json`),{force:!0}),
|
|
20961
|
-
let header3=teamHeaders[0]??"Authorization",trimmed=value3.trim();return{header:header3,value:header3.toLowerCase()==="authorization"&&!/^\w+\s/.test(trimmed)?`Bearer ${trimmed}`:trimmed}}var MEETING_PLATFORM_NAMES={meet:"Google Meet",teams:"Microsoft Teams",jitsi:"Jitsi Meet"},END_REASON_TEXT={left:"I left the meeting.",stop_requested:'Someone in the meeting typed "@notes stop", so I left.',meeting_ended:"The meeting ended.",removed:"Someone removed me from the meeting.",denied:"The host turned down my request to join.",lobby_timeout:"Nobody let me in, so I gave up waiting.",guests_blocked:"This meeting doesn't let guests join (the organizer's settings need a signed-in account),\
|
|
20950
|
+
people[person2]}return!this.appsAccess(person2)&&!!this.stored("project-apps.json",projectAppsSchema)?.people[person2]}appsLeftOnService(){return this.projectKey()?Object.keys(this.stored("apps.json",appsSchema)?.people??{}).length:0}appsAccess(person2){let apiKey=this.projectKey();return apiKey?this.projectAccess(person2,apiKey):this.serviceAccess(person2)}serviceAccess(person2){let file2=this.apps(),record31=file2.people[person2];return record31?managedComposioAccess(file2.brokerUrl,{composioBrokerUrl:file2.
|
|
20951
|
+
brokerUrl,composioBrokerToken:record31.token}):null}ensureAppsAccess(person2,email3){if(!PERSON.test(person2))return Promise.resolve(null);let apiKey=this.projectKey();if(apiKey)return this.ensureProjectAccess(person2,email3,apiKey);let held4=this.serviceAccess(person2);if(held4)return Promise.resolve(held4);let brokerUrl2=this.options.brokerUrl();if(!brokerUrl2)return Promise.resolve(null);let pending3=this.registering.get(person2);if(pending3)return pending3;let made=(async()=>(await ensureManagedComposioCredentials(
|
|
20952
|
+
{brokerUrl:brokerUrl2,credentials:{},fetchImpl:this.options.fetchImpl,saveCredentials:next=>{if(!next.composioBrokerToken||!next.composioInstallationId)return;let file2=this.apps();file2.people[person2]={email:email3,installationId:next.composioInstallationId,token:next.composioBrokerToken},this.write("apps.json",{...file2,brokerUrl:brokerUrl2}),this.remember(person2,email3)}}),this.serviceAccess(person2)))().finally(()=>this.registering.delete(person2));return this.registering.set(person2,made),
|
|
20953
|
+
made}appsPeople(){let apiKey=this.projectKey();if(apiKey)return Object.entries(this.projectApps(apiKey).people).flatMap(([person2,record31])=>{let access2=this.projectAccess(person2,apiKey);return access2?[{person:person2,email:record31.email,access:access2}]:[]});let file2=this.apps();return Object.entries(file2.people).flatMap(([person2,record31])=>{let access2=managedComposioAccess(file2.brokerUrl,{composioBrokerUrl:file2.brokerUrl,composioBrokerToken:record31.token});return access2?[{person:person2,
|
|
20954
|
+
email:record31.email,access:access2}]:[]})}key(person2,name6,url3){let held4=this.keys().people[person2]?.servers[name6];return held4&&held4.url===url3?held4:null}putKey(person2,email3,name6,key7){if(!PERSON.test(person2))throw new Error("invalid person");let file2=this.keys(),own4=file2.people[person2]??{email:email3,servers:{}};file2.people[person2]={email:email3,servers:{...own4.servers,[name6]:key7}},this.write("mcp-keys.json",file2),this.remember(person2,email3),this.options.onChanged?.(person2,
|
|
20955
|
+
"mcp",name6)}appConnecting(person2,slug3){this.options.onChanged?.(person2,"app",slug3)}deleteKey(person2,name6){let file2=this.keys();file2.people[person2]?.servers[name6]&&(delete file2.people[person2].servers[name6],this.write("mcp-keys.json",file2))}keyPeople(name6,url3){return Object.entries(this.keys().people).flatMap(([person2,record31])=>record31.servers[name6]?.url===url3?[{person:person2,email:record31.email}]:[])}oauth(person2){if(!PERSON.test(person2))throw new Error("invalid person");
|
|
20956
|
+
let manager=this.managers.get(person2);return manager||(this.ensureDir(),manager=new McpOAuthManager({file:join76(this.dir,"mcp-oauth",`${person2}.json`),clients:this.options.clients,isOwnerLive:this.options.isOwnerLive,onSettled:(name6,phase,owner2)=>{phase==="succeeded"&&this.options.onChanged?.(person2,"mcp",name6),this.options.onSettled?.(name6,phase,owner2)},...this.options.onRefresh?{onRefresh:(name6,outcome)=>this.options.onRefresh?.(person2,name6,outcome)}:{}}),this.managers.set(person2,
|
|
20957
|
+
manager)),manager}connection(person2,name6,url3){let key7=this.key(person2,name6,url3);return{oauth:this.oauth(person2),...key7?{key:key7}:{}}}liveManagers(){return[...this.managers.values()]}signedInPeople(name6,url3){let folder3=join76(this.dir,"mcp-oauth");return existsSync32(folder3)?readdirSync22(folder3).flatMap(file2=>{let person2=file2.replace(/\.json$/,"");return!PERSON.test(person2)||!file2.endsWith(".json")?[]:this.oauth(person2).authState(name6,url3)==="signed-in"?[{person:person2,email:this.
|
|
20958
|
+
emailOf(person2)??""}]:[]}):[]}emailOf(person2){return this.read("people.json",external_exports.record(external_exports.string(),external_exports.string()),{})[person2]??null}remember(person2,email3){if(!PERSON.test(person2)||!email3)return;let file2=this.read("people.json",external_exports.record(external_exports.string(),external_exports.string()),{});file2[person2]!==email3&&this.write("people.json",{...file2,[person2]:email3})}forgetServer(name6){let file2=this.keys(),changed3=!1;for(let record31 of Object.
|
|
20959
|
+
values(file2.people))record31.servers[name6]&&(delete record31.servers[name6],changed3=!0);changed3&&this.write("mcp-keys.json",file2);let folder3=join76(this.dir,"mcp-oauth");if(existsSync32(folder3))for(let entry2 of readdirSync22(folder3)){let person2=entry2.replace(/\.json$/,"");PERSON.test(person2)&&this.oauth(person2).forget(name6)}}async forgetPerson(person2){let apps3=this.apps();apps3.people[person2]&&(delete apps3.people[person2],this.write("apps.json",apps3));let project3=this.stored(
|
|
20960
|
+
"project-apps.json",projectAppsSchema),left2=project3?.people[person2];project3&&left2&&(delete project3.people[person2],this.write("project-apps.json",{...project3,removals:[...new Set([...project3.removals,left2.userId])]}),this.projectUsers.delete(person2));let keys5=this.keys();keys5.people[person2]&&(delete keys5.people[person2],this.write("mcp-keys.json",keys5)),this.managers.get(person2)?.dispose(),this.managers.delete(person2),rmSync26(join76(this.dir,"mcp-oauth",`${person2}.json`),{force:!0}),
|
|
20961
|
+
left2&&await this.finishRemovals()}};function personKeyHeader(teamHeaders,value3){let header3=teamHeaders[0]??"Authorization",trimmed=value3.trim();return{header:header3,value:header3.toLowerCase()==="authorization"&&!/^\w+\s/.test(trimmed)?`Bearer ${trimmed}`:trimmed}}var MEETING_PLATFORM_NAMES={meet:"Google Meet",teams:"Microsoft Teams",jitsi:"Jitsi Meet"},END_REASON_TEXT={left:"I left the meeting.",stop_requested:'Someone in the meeting typed "@notes stop", so I left.',meeting_ended:"The meeting ended.",removed:"Someone removed me from the meeting.",denied:"The host turned down my request to join.",lobby_timeout:"Nobody let me in, so I gave up waiting.",guests_blocked:"This meeting doesn't let guests join (the organizer's settings need a signed-in account),\
|
|
20962
20962
|
so I couldn't get in.",meet_refused:"Google Meet didn't let me in as a guest. The host can allow guests in Host controls, or the meeting may not allow people outside the organization.",not_found:"This meeting link isn't active. Check the link; the meeting may have ended.",join_failed:"I couldn't get through the meeting's join screen.",consent_failed:"I couldn't post my note-taking notice in the meeting chat (chat may be off for guests), so I left without recording anything.",alone:"Everyone els\
|
|
20963
20963
|
e left, so I left too.",max_length:"The meeting reached the 4-hour limit, so I left.",crashed:"The meeting bot stopped unexpectedly. What it heard until then is kept.",lost:"I lost contact with the cloud computer running the meeting. What it heard until then is kept.",speech_unavailable:"I couldn't get speech-to-text for this meeting, so I didn't join."},ZOOM_NOT_SUPPORTED="Zoom meetings aren't supported yet. I can join Google Meet, Microsoft Teams and Jitsi links.",NOT_A_MEETING="That doesn't l\
|
|
20964
20964
|
ook like a Google Meet, Microsoft Teams or Jitsi meeting link.",MEET_CODE=/^\/(?:meet\/)?[a-z]{3}-[a-z]{4}-[a-z]{3}\/?$/i,JITSI_HOSTS=/(^|\.)jit\.si$|^8x8\.vc$|^meet\.systemli\.org$|(^|\.)jitsi\./i;function parseMeetingLink(raw){let url3;try{url3=new URL(raw.trim())}catch{return{ok:!1,error:NOT_A_MEETING}}if(url3.protocol!=="https:"||url3.username||url3.password)return{ok:!1,error:NOT_A_MEETING};let host3=url3.hostname.toLowerCase();return/(^|\.)zoom\.(us|com)$|(^|\.)zoomgov\.com$/.test(host3)?{
|
package/dist-server/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"module","version":"0.3.
|
|
1
|
+
{"type":"module","version":"0.3.119"}
|
|
@@ -48,7 +48,7 @@ function readStored(file, brokerUrl) {
|
|
|
48
48
|
// A token goes only to the service that issued it.
|
|
49
49
|
if (parsed.data.brokerUrl !== brokerUrl)
|
|
50
50
|
return { kind: "none" };
|
|
51
|
-
return { kind: "held", credentials: { composioBrokerToken: parsed.data.token, composioInstallationId: parsed.data.installationId } };
|
|
51
|
+
return { kind: "held", credentials: { composioBrokerUrl: brokerUrl, composioBrokerToken: parsed.data.token, composioInstallationId: parsed.data.installationId } };
|
|
52
52
|
}
|
|
53
53
|
export function startCloudConnectedApps(options) {
|
|
54
54
|
const file = join(options.dataDir, CLOUD_CONNECTED_APPS_FILE);
|
|
@@ -242,7 +242,7 @@ export class PeopleConnections {
|
|
|
242
242
|
}
|
|
243
243
|
serviceAccess(person) {
|
|
244
244
|
const file = this.apps(), record = file.people[person];
|
|
245
|
-
return record ? managedComposioAccess(file.brokerUrl, { composioBrokerToken: record.token }) : null;
|
|
245
|
+
return record ? managedComposioAccess(file.brokerUrl, { composioBrokerUrl: file.brokerUrl, composioBrokerToken: record.token }) : null;
|
|
246
246
|
}
|
|
247
247
|
/** The member's own apps, made now if they have none (the first time they connect an app). */
|
|
248
248
|
ensureAppsAccess(person, email) {
|
|
@@ -289,7 +289,7 @@ export class PeopleConnections {
|
|
|
289
289
|
}
|
|
290
290
|
const file = this.apps();
|
|
291
291
|
return Object.entries(file.people).flatMap(([person, record]) => {
|
|
292
|
-
const access = managedComposioAccess(file.brokerUrl, { composioBrokerToken: record.token });
|
|
292
|
+
const access = managedComposioAccess(file.brokerUrl, { composioBrokerUrl: file.brokerUrl, composioBrokerToken: record.token });
|
|
293
293
|
return access ? [{ person, email: record.email, access }] : [];
|
|
294
294
|
});
|
|
295
295
|
}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{U as a,C as n}from"./mermaid.core-BsWFxjqV.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{c as r,s as e}from"./flowDiagram-OXPTDLAJ-D34L-z_p.js";import{_ as o}from"./mermaid.core-BsWFxjqV.js";import"./chunk-5VM5RSS4-CRYUMaqs.js";import"./chunk-XXDRQBXY-BQnjxxw-.js";import"./chunk-KQW6MTUR-DdZVmWiZ.js";import"./chunk-7TKQ45FW-4KPnQ7rv.js";import"./channel-Cj6Zhjek.js";import"./styles-DaC7RuGF.js";import"./step-CkmJJ7wq.js";var a=o(t=>`${e(t)}
|
|
2
|
-
.swimlane.cluster:not([data-color-id]) rect {
|
|
3
|
-
stroke: ${t.clusterBorder} !important;
|
|
4
|
-
}
|
|
5
|
-
[data-look="neo"].cluster rect {
|
|
6
|
-
filter: none;
|
|
7
|
-
}
|
|
8
|
-
`,"getStyles"),m=a,y=r({styles:m});export{y as diagram};
|