@launchsecure/launch-kit 0.0.38 → 0.0.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/dist/beacon/beacon.mjs +308 -298
  2. package/dist/beacon/beacon.mjs.map +1 -1
  3. package/dist/beacon/beacon.umd.js +6 -6
  4. package/dist/beacon/beacon.umd.js.map +1 -1
  5. package/dist/beacon/types/internal/screenshot.d.ts.map +1 -1
  6. package/dist/chart-client/assets/index-ysGpLeOW.css +1 -0
  7. package/dist/chart-client/index.html +2 -2
  8. package/dist/client/assets/index-CMN3tlGP.css +32 -0
  9. package/dist/client/index.html +2 -2
  10. package/dist/council-client/assets/index-ChmNX6bZ.css +1 -0
  11. package/dist/council-client/index.html +2 -2
  12. package/dist/deck-client/assets/{_baseUniq-CgW32Gdk.js → _baseUniq-DOrnEQMI.js} +1 -1
  13. package/dist/deck-client/assets/{arc-D-Mg9gvM.js → arc-DOWK7V3m.js} +1 -1
  14. package/dist/deck-client/assets/{architectureDiagram-Q4EWVU46-CdTsXsgl.js → architectureDiagram-Q4EWVU46-DPhzvk7q.js} +1 -1
  15. package/dist/deck-client/assets/{blockDiagram-DXYQGD6D-mwTneYyB.js → blockDiagram-DXYQGD6D-CwAGy9lU.js} +1 -1
  16. package/dist/deck-client/assets/{c4Diagram-AHTNJAMY-C4R8IbjO.js → c4Diagram-AHTNJAMY-L_g_SS21.js} +1 -1
  17. package/dist/deck-client/assets/channel-DqiACUUq.js +1 -0
  18. package/dist/deck-client/assets/{chunk-4BX2VUAB-ZWuRIUwb.js → chunk-4BX2VUAB-RKm0LXpu.js} +1 -1
  19. package/dist/deck-client/assets/{chunk-4TB4RGXK-PNHX10sF.js → chunk-4TB4RGXK-Bk0FUbxU.js} +1 -1
  20. package/dist/deck-client/assets/{chunk-55IACEB6-CD9MUgPr.js → chunk-55IACEB6-Cl3hja-M.js} +1 -1
  21. package/dist/deck-client/assets/{chunk-EDXVE4YY-C_CpORb3.js → chunk-EDXVE4YY-CNIMQCV2.js} +1 -1
  22. package/dist/deck-client/assets/{chunk-FMBD7UC4-Bg5RoVC-.js → chunk-FMBD7UC4-DqOvWr1k.js} +1 -1
  23. package/dist/deck-client/assets/{chunk-OYMX7WX6-DhTwgQwd.js → chunk-OYMX7WX6-1Kd7yK5u.js} +1 -1
  24. package/dist/deck-client/assets/{chunk-QZHKN3VN-C5VLMaFa.js → chunk-QZHKN3VN-6_kraYpP.js} +1 -1
  25. package/dist/deck-client/assets/{chunk-YZCP3GAM-NAGHy4Sr.js → chunk-YZCP3GAM-FgAwIWlo.js} +1 -1
  26. package/dist/deck-client/assets/classDiagram-6PBFFD2Q-D23cq2C3.js +1 -0
  27. package/dist/deck-client/assets/classDiagram-v2-HSJHXN6E-D23cq2C3.js +1 -0
  28. package/dist/deck-client/assets/clone-C7jSigGq.js +1 -0
  29. package/dist/deck-client/assets/{cose-bilkent-S5V4N54A-CpUczjZk.js → cose-bilkent-S5V4N54A-CigVnnPr.js} +1 -1
  30. package/dist/deck-client/assets/{dagre-KV5264BT-BOvb07MG.js → dagre-KV5264BT-DHZXTktX.js} +1 -1
  31. package/dist/deck-client/assets/{diagram-5BDNPKRD-BPxwTiC-.js → diagram-5BDNPKRD-H5k0eauU.js} +1 -1
  32. package/dist/deck-client/assets/{diagram-G4DWMVQ6-Dz_gsHgx.js → diagram-G4DWMVQ6-Bg3dFhSY.js} +1 -1
  33. package/dist/deck-client/assets/{diagram-MMDJMWI5-B7z-oVTW.js → diagram-MMDJMWI5-CQLC410N.js} +1 -1
  34. package/dist/deck-client/assets/{diagram-TYMM5635-CAIAglLQ.js → diagram-TYMM5635-DFTCHVkP.js} +1 -1
  35. package/dist/deck-client/assets/{erDiagram-SMLLAGMA-BiViTWF3.js → erDiagram-SMLLAGMA-aiv9GZnL.js} +1 -1
  36. package/dist/deck-client/assets/{flowDiagram-DWJPFMVM-DYVemp0H.js → flowDiagram-DWJPFMVM-C6Fhvtsy.js} +1 -1
  37. package/dist/deck-client/assets/{ganttDiagram-T4ZO3ILL-Chc1Iyu1.js → ganttDiagram-T4ZO3ILL-DSaGMPM4.js} +1 -1
  38. package/dist/deck-client/assets/{gitGraphDiagram-UUTBAWPF-B7eFgaj5.js → gitGraphDiagram-UUTBAWPF-DMjL2Vix.js} +1 -1
  39. package/dist/deck-client/assets/{graph-CKaIoNwb.js → graph-B7Vn5lkK.js} +1 -1
  40. package/dist/deck-client/assets/{index-BRawc7RA.js → index-BD36e-tD.js} +68 -68
  41. package/dist/deck-client/assets/index-CGbNOpk9.css +1 -0
  42. package/dist/deck-client/assets/{infoDiagram-42DDH7IO-BxsVq7vO.js → infoDiagram-42DDH7IO-mNi4iygG.js} +1 -1
  43. package/dist/deck-client/assets/{ishikawaDiagram-UXIWVN3A-DAM7vPwa.js → ishikawaDiagram-UXIWVN3A-BwCUmUVt.js} +1 -1
  44. package/dist/deck-client/assets/{journeyDiagram-VCZTEJTY-Xe20Nf7R.js → journeyDiagram-VCZTEJTY-C6qoqJmJ.js} +1 -1
  45. package/dist/deck-client/assets/{kanban-definition-6JOO6SKY-DS8YguzB.js → kanban-definition-6JOO6SKY-Dz1Tt3sA.js} +1 -1
  46. package/dist/deck-client/assets/{layout-DKMBpzR-.js → layout-CZTyRhOG.js} +1 -1
  47. package/dist/deck-client/assets/{linear-DTNtBg5h.js → linear--7n7iEvd.js} +1 -1
  48. package/dist/deck-client/assets/{min-C4DrxCcA.js → min-Bh130DN8.js} +1 -1
  49. package/dist/deck-client/assets/{mindmap-definition-QFDTVHPH-B4nEtsw5.js → mindmap-definition-QFDTVHPH-CfXcK1qH.js} +1 -1
  50. package/dist/deck-client/assets/{pieDiagram-DEJITSTG-BzHdGNu5.js → pieDiagram-DEJITSTG-DjVHLAVw.js} +1 -1
  51. package/dist/deck-client/assets/{quadrantDiagram-34T5L4WZ-CaX0SD4-.js → quadrantDiagram-34T5L4WZ-CXwvZ1i1.js} +1 -1
  52. package/dist/deck-client/assets/{requirementDiagram-MS252O5E-QeG4p2ni.js → requirementDiagram-MS252O5E-Cl6xm0fR.js} +1 -1
  53. package/dist/deck-client/assets/{sankeyDiagram-XADWPNL6-BoAwgAj-.js → sankeyDiagram-XADWPNL6-BOH9sLyh.js} +1 -1
  54. package/dist/deck-client/assets/{sequenceDiagram-FGHM5R23-Dn4pYYgu.js → sequenceDiagram-FGHM5R23-BC1MYBn6.js} +1 -1
  55. package/dist/deck-client/assets/{stateDiagram-FHFEXIEX-Is6KRmQV.js → stateDiagram-FHFEXIEX-kNp9bv8K.js} +1 -1
  56. package/dist/deck-client/assets/stateDiagram-v2-QKLJ7IA2-hRsAFc2t.js +1 -0
  57. package/dist/deck-client/assets/{timeline-definition-GMOUNBTQ-v64IZGuY.js → timeline-definition-GMOUNBTQ-DKnITsD4.js} +1 -1
  58. package/dist/deck-client/assets/{vennDiagram-DHZGUBPP-noh9eouF.js → vennDiagram-DHZGUBPP-BdajXRrh.js} +1 -1
  59. package/dist/deck-client/assets/wardley-RL74JXVD-BL802-su.js +162 -0
  60. package/dist/deck-client/assets/{wardleyDiagram-NUSXRM2D-DxR4j737.js → wardleyDiagram-NUSXRM2D-B2hDCDl2.js} +1 -1
  61. package/dist/deck-client/assets/{xychartDiagram-5P7HB3ND-B26vodaL.js → xychartDiagram-5P7HB3ND-CvnYFs51.js} +1 -1
  62. package/dist/deck-client/index.html +2 -2
  63. package/dist/server/council-entry.js +0 -0
  64. package/dist/server/deck-mcp-entry.js +3 -1
  65. package/dist/server/deck-serve.js +3 -1
  66. package/dist/server/fb-wizard.js +0 -0
  67. package/dist/server/init-entry.js +152 -25
  68. package/dist/server/radar-docker-init-entry.js +0 -0
  69. package/dist/server/radar-entrypoint-entry.js +0 -0
  70. package/dist/server/radar-teardown-entry.js +0 -0
  71. package/dist/server/rover-entry.js +44 -1
  72. package/package.json +23 -22
  73. package/scaffolds/ls-marketplace/plugins/kit/commands/activate-statusline.md +8 -7
  74. package/scaffolds/ls-marketplace/plugins/kit/commands/deactivate-statusline.md +2 -2
  75. package/scaffolds/ls-marketplace/plugins/kit/skills/comms/SKILL.md +88 -0
  76. package/scaffolds/ls-marketplace/plugins/kit/skills/project-info/SKILL.md +88 -0
  77. package/scaffolds/ls-marketplace/plugins/kit/skills/slides/SKILL.md +118 -0
  78. package/scaffolds/migrate-safety/scripts/migrate-with-backup.sh +0 -0
  79. package/scaffolds/recall-hook/scripts/ensure-recall.sh +0 -0
  80. package/scaffolds/statusline/statusline-base.sh +20 -0
  81. package/dist/chart-client/assets/index-B6rR0CWx.css +0 -1
  82. package/dist/client/assets/index-D6uX1lQe.css +0 -32
  83. package/dist/council-client/assets/index-CleYLarJ.css +0 -1
  84. package/dist/deck-client/assets/channel-CuSee7GO.js +0 -1
  85. package/dist/deck-client/assets/classDiagram-6PBFFD2Q-_kTisqzs.js +0 -1
  86. package/dist/deck-client/assets/classDiagram-v2-HSJHXN6E-_kTisqzs.js +0 -1
  87. package/dist/deck-client/assets/clone-kb3zkY60.js +0 -1
  88. package/dist/deck-client/assets/index-55P73aS_.css +0 -1
  89. package/dist/deck-client/assets/stateDiagram-v2-QKLJ7IA2-Cy45Ttqq.js +0 -1
  90. package/dist/deck-client/assets/wardley-RL74JXVD-cJ_1is2S.js +0 -162
  91. /package/dist/chart-client/assets/{index-C_xCi3gW.js → index-BlsuXuQ1.js} +0 -0
  92. /package/dist/client/assets/{index-CRecYFUA.js → index-BA7BHBWT.js} +0 -0
  93. /package/dist/council-client/assets/{index-DO-Vn15O.js → index-jjBWyhry.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{s as zt,g as Lt,q as Xt,p as At,a as Ct,b as Et,_ as y,l as et,I as Tt,e as Yt,z as Bt,c as H,i as Rt}from"./index-BRawc7RA.js";import{p as Ft}from"./chunk-4BX2VUAB-ZWuRIUwb.js";import{p as It}from"./wardley-RL74JXVD-cJ_1is2S.js";import"./min-C4DrxCcA.js";import"./_baseUniq-CgW32Gdk.js";var q=y((a,r)=>{const e=a<=1?a*100:a;if(e<0||e>100)throw new Error(`${r} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${a}`);return e},"toPercent"),Y=y((a,r,e)=>({x:q(r,`${e} evolution`),y:q(a,`${e} visibility`)}),"toCoordinates"),tt=y(a=>{if(a){if(a==="+<>")return"bidirectional";if(a==="+<")return"backward";if(a==="+>")return"forward"}},"getFlowFromPort"),Ot=y(a=>{if(!(a!=null&&a.startsWith("+")))return{};const r=/^\+'([^']*)'/.exec(a),e=r==null?void 0:r[1];return a.includes("<>")?{flow:"bidirectional",label:e}:a.includes("<")?{flow:"backward",label:e}:a.includes(">")?{flow:"forward",label:e}:{label:e}},"extractFlowFromArrow"),Wt=y((a,r)=>{if(Ft(a,r),a.size&&r.setSize(a.size.width,a.size.height),a.evolution){const e=a.evolution.stages.map(o=>o.secondName?`${o.name.trim()} / ${o.secondName.trim()}`:o.name.trim()),h=a.evolution.stages.filter(o=>o.boundary!==void 0).map(o=>o.boundary);r.updateAxes({stages:e,stageBoundaries:h})}if(a.anchors.forEach(e=>{const h=Y(e.visibility,e.evolution,`Anchor "${e.name}"`);r.addNode(e.name,e.name,h.x,h.y,"anchor")}),a.components.forEach(e=>{var v;const h=Y(e.visibility,e.evolution,`Component "${e.name}"`),o=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,m=(v=e.decorator)==null?void 0:v.strategy;r.addNode(e.name,e.name,h.x,h.y,"component",o,d,e.inertia,m)}),a.notes.forEach(e=>{const h=Y(e.visibility,e.evolution,`Note "${e.text}"`);r.addNote(e.text,h.x,h.y)}),a.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 o=h.y;r.startPipeline(e.parent),e.components.forEach(d=>{const m=`${e.parent}_${d.name}`,v=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,A=q(d.evolution,`Pipeline component "${d.name}" evolution`);r.addNode(m,d.name,A,o,"pipeline-component",v,g),r.addPipelineComponent(e.parent,m)})}),a.links.forEach(e=>{const h=!!e.arrow&&(e.arrow.includes("-.->")||e.arrow.includes(".-."));let o=tt(e.fromPort)??tt(e.toPort);const{flow:d,label:m}=Ot(e.arrow);!o&&d&&(o=d);const v=e.linkLabel,g=m??v;r.addLink(e.from,e.to,h,g,o)}),a.evolves.forEach(e=>{const h=r.getNode(e.component);if((h==null?void 0:h.y)!==void 0){const o=q(e.target,`Evolve target for "${e.component}"`);r.addTrend(e.component,o,h.y)}}),a.annotations.length>0){const e=a.annotations[0],h=Y(e.x,e.y,"Annotations box");r.setAnnotationsBox(h.x,h.y)}a.annotation.forEach(e=>{const h=Y(e.x,e.y,`Annotation ${e.number}`);r.addAnnotation(e.number,[{x:h.x,y:h.y}],e.text)}),a.accelerators.forEach(e=>{const h=Y(e.x,e.y,`Accelerator "${e.name}"`);r.addAccelerator(e.name,h.x,h.y)}),a.deaccelerators.forEach(e=>{const h=Y(e.x,e.y,`Deaccelerator "${e.name}"`);r.addDeaccelerator(e.name,h.x,h.y)})},"populateDb"),at={parser:{yy:void 0},parse:y(async a=>{var h;const r=await It("wardley",a);et.debug(r);const e=(h=at.parser)==null?void 0:h.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")},R,Dt=(R=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 o=this.nodes.get(e);o&&(o.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)}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}},y(R,"WardleyBuilder"),R),P=new Dt;function N(a){const r=H();return Rt(a.trim(),r)}y(N,"textSanitizer");function rt(){return H()["wardley-beta"]}y(rt,"getConfig");function ot(a,r,e,h,o,d,m,v,g){P.addNode({id:a,label:N(r),x:e,y:h,className:o,labelOffsetX:d,labelOffsetY:m,inertia:v,sourceStrategy:g})}y(ot,"addNode");function st(a,r,e=!1,h,o){P.addLink({source:a,target:r,dashed:e,label:h,flow:o})}y(st,"addLink");function nt(a,r,e){P.addTrend({nodeId:a,targetX:r,targetY:e})}y(nt,"addTrend");function it(a,r,e){P.addAnnotation({number:a,coordinates:r,text:e?N(e):void 0})}y(it,"addAnnotation");function dt(a,r,e){P.addNote({text:N(a),x:r,y:e})}y(dt,"addNote");function lt(a,r,e){P.addAccelerator({name:N(a),x:r,y:e})}y(lt,"addAccelerator");function ct(a,r,e){P.addDeaccelerator({name:N(a),x:r,y:e})}y(ct,"addDeaccelerator");function pt(a,r){P.setAnnotationsBox(a,r)}y(pt,"setAnnotationsBox");function ht(a,r){P.setSize(a,r)}y(ht,"setSize");function xt(a){P.startPipeline(a)}y(xt,"startPipeline");function ft(a,r){P.addPipelineComponent(a,r)}y(ft,"addPipelineComponent");function gt(a){const r={};a.xLabel&&(r.xLabel=N(a.xLabel)),a.yLabel&&(r.yLabel=N(a.yLabel)),a.stages&&(r.stages=a.stages.map(e=>N(e))),a.stageBoundaries&&(r.stageBoundaries=a.stageBoundaries),P.setAxes(r)}y(gt,"updateAxes");function ut(a){return P.getNode(a)}y(ut,"getNode");function yt(){return P.build()}y(yt,"getWardleyData");function mt(){P.clear(),Bt()}y(mt,"clear");var Gt={getConfig:rt,addNode:ot,addLink:st,addTrend:nt,addAnnotation:it,addNote:dt,addAccelerator:lt,addDeaccelerator:ct,setAnnotationsBox:pt,setSize:ht,startPipeline:xt,addPipelineComponent:ft,updateAxes:gt,getNode:ut,getWardleyData:yt,clear:mt,setAccTitle:Et,getAccTitle:Ct,setDiagramTitle:At,getDiagramTitle:Xt,getAccDescription:Lt,setAccDescription:zt},qt=["Genesis","Custom Built","Product","Commodity"],Ht=y(()=>{var r,e,h,o,d,m,v,g,A,M,b,z;const{themeVariables:a}=H();return{backgroundColor:((r=a.wardley)==null?void 0:r.backgroundColor)??a.background??"#fff",axisColor:((e=a.wardley)==null?void 0:e.axisColor)??"#000",axisTextColor:((h=a.wardley)==null?void 0:h.axisTextColor)??a.primaryTextColor??"#222",gridColor:((o=a.wardley)==null?void 0:o.gridColor)??"rgba(100, 100, 100, 0.2)",componentFill:((d=a.wardley)==null?void 0:d.componentFill)??"#fff",componentStroke:((m=a.wardley)==null?void 0:m.componentStroke)??"#000",componentLabelColor:((v=a.wardley)==null?void 0:v.componentLabelColor)??a.primaryTextColor??"#222",linkStroke:((g=a.wardley)==null?void 0:g.linkStroke)??"#000",evolutionStroke:((A=a.wardley)==null?void 0:A.evolutionStroke)??"#dc3545",annotationStroke:((M=a.wardley)==null?void 0:M.annotationStroke)??"#000",annotationTextColor:((b=a.wardley)==null?void 0:b.annotationTextColor)??a.primaryTextColor??"#222",annotationFill:((z=a.wardley)==null?void 0:z.annotationFill)??a.background??"#fff"}},"getTheme"),jt=y(()=>{const a=H()["wardley-beta"];return{width:(a==null?void 0:a.width)??900,height:(a==null?void 0:a.height)??600,padding:(a==null?void 0:a.padding)??48,nodeRadius:(a==null?void 0:a.nodeRadius)??6,nodeLabelOffset:(a==null?void 0:a.nodeLabelOffset)??8,axisFontSize:(a==null?void 0:a.axisFontSize)??12,labelFontSize:(a==null?void 0:a.labelFontSize)??10,showGrid:(a==null?void 0:a.showGrid)??!1,useMaxWidth:(a==null?void 0:a.useMaxWidth)??!0}},"getConfigValues"),_t=y((a,r,e,h)=>{var K,Q;et.debug(`Rendering Wardley map
1
+ import{s as zt,g as Lt,q as Xt,p as At,a as Ct,b as Et,_ as y,l as et,I as Tt,e as Yt,z as Bt,c as H,i as Rt}from"./index-BD36e-tD.js";import{p as Ft}from"./chunk-4BX2VUAB-RKm0LXpu.js";import{p as It}from"./wardley-RL74JXVD-BL802-su.js";import"./min-Bh130DN8.js";import"./_baseUniq-DOrnEQMI.js";var q=y((a,r)=>{const e=a<=1?a*100:a;if(e<0||e>100)throw new Error(`${r} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${a}`);return e},"toPercent"),Y=y((a,r,e)=>({x:q(r,`${e} evolution`),y:q(a,`${e} visibility`)}),"toCoordinates"),tt=y(a=>{if(a){if(a==="+<>")return"bidirectional";if(a==="+<")return"backward";if(a==="+>")return"forward"}},"getFlowFromPort"),Ot=y(a=>{if(!(a!=null&&a.startsWith("+")))return{};const r=/^\+'([^']*)'/.exec(a),e=r==null?void 0:r[1];return a.includes("<>")?{flow:"bidirectional",label:e}:a.includes("<")?{flow:"backward",label:e}:a.includes(">")?{flow:"forward",label:e}:{label:e}},"extractFlowFromArrow"),Wt=y((a,r)=>{if(Ft(a,r),a.size&&r.setSize(a.size.width,a.size.height),a.evolution){const e=a.evolution.stages.map(o=>o.secondName?`${o.name.trim()} / ${o.secondName.trim()}`:o.name.trim()),h=a.evolution.stages.filter(o=>o.boundary!==void 0).map(o=>o.boundary);r.updateAxes({stages:e,stageBoundaries:h})}if(a.anchors.forEach(e=>{const h=Y(e.visibility,e.evolution,`Anchor "${e.name}"`);r.addNode(e.name,e.name,h.x,h.y,"anchor")}),a.components.forEach(e=>{var v;const h=Y(e.visibility,e.evolution,`Component "${e.name}"`),o=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,m=(v=e.decorator)==null?void 0:v.strategy;r.addNode(e.name,e.name,h.x,h.y,"component",o,d,e.inertia,m)}),a.notes.forEach(e=>{const h=Y(e.visibility,e.evolution,`Note "${e.text}"`);r.addNote(e.text,h.x,h.y)}),a.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 o=h.y;r.startPipeline(e.parent),e.components.forEach(d=>{const m=`${e.parent}_${d.name}`,v=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,A=q(d.evolution,`Pipeline component "${d.name}" evolution`);r.addNode(m,d.name,A,o,"pipeline-component",v,g),r.addPipelineComponent(e.parent,m)})}),a.links.forEach(e=>{const h=!!e.arrow&&(e.arrow.includes("-.->")||e.arrow.includes(".-."));let o=tt(e.fromPort)??tt(e.toPort);const{flow:d,label:m}=Ot(e.arrow);!o&&d&&(o=d);const v=e.linkLabel,g=m??v;r.addLink(e.from,e.to,h,g,o)}),a.evolves.forEach(e=>{const h=r.getNode(e.component);if((h==null?void 0:h.y)!==void 0){const o=q(e.target,`Evolve target for "${e.component}"`);r.addTrend(e.component,o,h.y)}}),a.annotations.length>0){const e=a.annotations[0],h=Y(e.x,e.y,"Annotations box");r.setAnnotationsBox(h.x,h.y)}a.annotation.forEach(e=>{const h=Y(e.x,e.y,`Annotation ${e.number}`);r.addAnnotation(e.number,[{x:h.x,y:h.y}],e.text)}),a.accelerators.forEach(e=>{const h=Y(e.x,e.y,`Accelerator "${e.name}"`);r.addAccelerator(e.name,h.x,h.y)}),a.deaccelerators.forEach(e=>{const h=Y(e.x,e.y,`Deaccelerator "${e.name}"`);r.addDeaccelerator(e.name,h.x,h.y)})},"populateDb"),at={parser:{yy:void 0},parse:y(async a=>{var h;const r=await It("wardley",a);et.debug(r);const e=(h=at.parser)==null?void 0:h.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")},R,Dt=(R=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 o=this.nodes.get(e);o&&(o.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)}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}},y(R,"WardleyBuilder"),R),P=new Dt;function N(a){const r=H();return Rt(a.trim(),r)}y(N,"textSanitizer");function rt(){return H()["wardley-beta"]}y(rt,"getConfig");function ot(a,r,e,h,o,d,m,v,g){P.addNode({id:a,label:N(r),x:e,y:h,className:o,labelOffsetX:d,labelOffsetY:m,inertia:v,sourceStrategy:g})}y(ot,"addNode");function st(a,r,e=!1,h,o){P.addLink({source:a,target:r,dashed:e,label:h,flow:o})}y(st,"addLink");function nt(a,r,e){P.addTrend({nodeId:a,targetX:r,targetY:e})}y(nt,"addTrend");function it(a,r,e){P.addAnnotation({number:a,coordinates:r,text:e?N(e):void 0})}y(it,"addAnnotation");function dt(a,r,e){P.addNote({text:N(a),x:r,y:e})}y(dt,"addNote");function lt(a,r,e){P.addAccelerator({name:N(a),x:r,y:e})}y(lt,"addAccelerator");function ct(a,r,e){P.addDeaccelerator({name:N(a),x:r,y:e})}y(ct,"addDeaccelerator");function pt(a,r){P.setAnnotationsBox(a,r)}y(pt,"setAnnotationsBox");function ht(a,r){P.setSize(a,r)}y(ht,"setSize");function xt(a){P.startPipeline(a)}y(xt,"startPipeline");function ft(a,r){P.addPipelineComponent(a,r)}y(ft,"addPipelineComponent");function gt(a){const r={};a.xLabel&&(r.xLabel=N(a.xLabel)),a.yLabel&&(r.yLabel=N(a.yLabel)),a.stages&&(r.stages=a.stages.map(e=>N(e))),a.stageBoundaries&&(r.stageBoundaries=a.stageBoundaries),P.setAxes(r)}y(gt,"updateAxes");function ut(a){return P.getNode(a)}y(ut,"getNode");function yt(){return P.build()}y(yt,"getWardleyData");function mt(){P.clear(),Bt()}y(mt,"clear");var Gt={getConfig:rt,addNode:ot,addLink:st,addTrend:nt,addAnnotation:it,addNote:dt,addAccelerator:lt,addDeaccelerator:ct,setAnnotationsBox:pt,setSize:ht,startPipeline:xt,addPipelineComponent:ft,updateAxes:gt,getNode:ut,getWardleyData:yt,clear:mt,setAccTitle:Et,getAccTitle:Ct,setDiagramTitle:At,getDiagramTitle:Xt,getAccDescription:Lt,setAccDescription:zt},qt=["Genesis","Custom Built","Product","Commodity"],Ht=y(()=>{var r,e,h,o,d,m,v,g,A,M,b,z;const{themeVariables:a}=H();return{backgroundColor:((r=a.wardley)==null?void 0:r.backgroundColor)??a.background??"#fff",axisColor:((e=a.wardley)==null?void 0:e.axisColor)??"#000",axisTextColor:((h=a.wardley)==null?void 0:h.axisTextColor)??a.primaryTextColor??"#222",gridColor:((o=a.wardley)==null?void 0:o.gridColor)??"rgba(100, 100, 100, 0.2)",componentFill:((d=a.wardley)==null?void 0:d.componentFill)??"#fff",componentStroke:((m=a.wardley)==null?void 0:m.componentStroke)??"#000",componentLabelColor:((v=a.wardley)==null?void 0:v.componentLabelColor)??a.primaryTextColor??"#222",linkStroke:((g=a.wardley)==null?void 0:g.linkStroke)??"#000",evolutionStroke:((A=a.wardley)==null?void 0:A.evolutionStroke)??"#dc3545",annotationStroke:((M=a.wardley)==null?void 0:M.annotationStroke)??"#000",annotationTextColor:((b=a.wardley)==null?void 0:b.annotationTextColor)??a.primaryTextColor??"#222",annotationFill:((z=a.wardley)==null?void 0:z.annotationFill)??a.background??"#fff"}},"getTheme"),jt=y(()=>{const a=H()["wardley-beta"];return{width:(a==null?void 0:a.width)??900,height:(a==null?void 0:a.height)??600,padding:(a==null?void 0:a.padding)??48,nodeRadius:(a==null?void 0:a.nodeRadius)??6,nodeLabelOffset:(a==null?void 0:a.nodeLabelOffset)??8,axisFontSize:(a==null?void 0:a.axisFontSize)??12,labelFontSize:(a==null?void 0:a.labelFontSize)??10,showGrid:(a==null?void 0:a.showGrid)??!1,useMaxWidth:(a==null?void 0:a.useMaxWidth)??!0}},"getConfigValues"),_t=y((a,r,e,h)=>{var K,Q;et.debug(`Rendering Wardley map
2
2
  `+a);const o=jt(),d=Ht(),m=o.nodeRadius*1.6,v=h.db,g=v.getWardleyData(),A=v.getDiagramTitle(),M=((K=g.size)==null?void 0:K.width)??o.width,b=((Q=g.size)==null?void 0:Q.height)??o.height,z=Tt(r);z.selectAll("*").remove(),Yt(z,b,M,o.useMaxWidth),z.attr("viewBox",`0 0 ${M} ${b}`);const S=z.append("g").attr("class","wardley-map"),j=z.append("defs");j.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"),j.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"),j.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"),S.append("rect").attr("class","wardley-background").attr("width",M).attr("height",b).attr("fill",d.backgroundColor);const F=M-o.padding*2,I=b-o.padding*2;A&&S.append("text").attr("class","wardley-title").attr("x",M/2).attr("y",o.padding/2).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(A);const C=y(t=>o.padding+t/100*F,"projectX"),E=y(t=>b-o.padding-t/100*I,"projectY"),W=S.append("g").attr("class","wardley-axes");W.append("line").attr("x1",o.padding).attr("x2",M-o.padding).attr("y1",b-o.padding).attr("y2",b-o.padding).attr("stroke",d.axisColor).attr("stroke-width",1),W.append("line").attr("x1",o.padding).attr("x2",o.padding).attr("y1",o.padding).attr("y2",b-o.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const wt=g.axes.xLabel??"Evolution",bt=g.axes.yLabel??"Visibility";W.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",o.padding+F/2).attr("y",b-o.padding/4).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(wt),W.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",o.padding/3).attr("y",o.padding+I/2).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${o.padding/3} ${o.padding+I/2})`).text(bt);const O=g.axes.stages&&g.axes.stages.length>0?g.axes.stages:qt;if(O.length>0){const t=S.append("g").attr("class","wardley-stages"),n=g.axes.stageBoundaries,s=[];if(n&&n.length===O.length){let i=0;n.forEach(p=>{s.push({start:i,end:p}),i=p})}else{const i=1/O.length;O.forEach((p,l)=>{s.push({start:l*i,end:(l+1)*i})})}O.forEach((i,p)=>{const l=s[p],x=o.padding+l.start*F,f=o.padding+l.end*F,u=(x+f)/2;p>0&&t.append("line").attr("x1",x).attr("x2",x).attr("y1",o.padding).attr("y2",b-o.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",u).attr("y",b-o.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize-2).attr("text-anchor","middle").text(i)})}if(o.showGrid){const t=S.append("g").attr("class","wardley-grid");for(let n=1;n<4;n++){const s=n/4,i=o.padding+F*s;t.append("line").attr("x1",i).attr("x2",i).attr("y1",o.padding).attr("y2",b-o.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",o.padding).attr("x2",M-o.padding).attr("y1",b-o.padding-I*s).attr("y2",b-o.padding-I*s).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const c=new Map;if(g.nodes.forEach(t=>{c.set(t.id,{x:C(t.x),y:E(t.y),node:t})}),g.pipelines.length>0){const t=S.append("g").attr("class","wardley-pipelines"),n=S.append("g").attr("class","wardley-pipeline-links");g.pipelines.forEach(s=>{if(s.componentIds.length===0)return;const i=s.componentIds.map(f=>({id:f,pos:c.get(f),node:g.nodes.find(u=>u.id===f)})).filter(f=>f.pos&&f.node).sort((f,u)=>f.node.x-u.node.x);for(let f=0;f<i.length-1;f++){const u=i[f],w=i[f+1];n.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",u.pos.x).attr("y1",u.pos.y).attr("x2",w.pos.x).attr("y2",w.pos.y).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let p=1/0,l=-1/0,x=0;if(s.componentIds.forEach(f=>{const u=c.get(f);u&&(p=Math.min(p,u.x),l=Math.max(l,u.x),x=u.y)}),p!==1/0&&l!==-1/0){const u=o.nodeRadius*4,w=x-u/2,$=c.get(s.nodeId);if($){const X=(p+l)/2;$.x=X,$.y=w-m/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",p-15).attr("y",w).attr("width",l-p+15*2).attr("height",u).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const Z=S.append("g").attr("class","wardley-links"),U=new Map;g.pipelines.forEach(t=>{U.set(t.nodeId,new Set(t.componentIds))});const J=g.links.filter(t=>{if(!c.has(t.source)||!c.has(t.target))return!1;const n=U.get(t.target);return!(n!=null&&n.has(t.source))});Z.selectAll("line").data(J).enter().append("line").attr("class",t=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",t=>{const n=c.get(t.source),s=c.get(t.target),p=g.nodes.find(u=>u.id===t.source).isPipelineParent?m/Math.sqrt(2):o.nodeRadius,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x);return n.x+l/f*p}).attr("y1",t=>{const n=c.get(t.source),s=c.get(t.target),p=g.nodes.find(u=>u.id===t.source).isPipelineParent?m/Math.sqrt(2):o.nodeRadius,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x);return n.y+x/f*p}).attr("x2",t=>{const n=c.get(t.source),s=c.get(t.target),p=g.nodes.find(u=>u.id===t.target).isPipelineParent?m/Math.sqrt(2):o.nodeRadius,l=n.x-s.x,x=n.y-s.y,f=Math.sqrt(l*l+x*x);return s.x+l/f*p}).attr("y2",t=>{const n=c.get(t.source),s=c.get(t.target),p=g.nodes.find(u=>u.id===t.target).isPipelineParent?m/Math.sqrt(2):o.nodeRadius,l=n.x-s.x,x=n.y-s.y,f=Math.sqrt(l*l+x*x);return s.y+x/f*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),Z.selectAll("text").data(J.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.x+s.x)/2,p=s.y-n.y,l=s.x-n.x,x=Math.sqrt(l*l+p*p),f=8,u=p/x;return i+u*f}).attr("y",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.y+s.y)/2,p=s.x-n.x,l=s.y-n.y,x=Math.sqrt(p*p+l*l),f=8,u=-p/x;return i+u*f}).attr("fill",d.axisTextColor).attr("font-size",o.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.x+s.x)/2,p=(n.y+s.y)/2,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x),u=8,w=x/f,$=-l/f,X=i+w*u,D=p+$*u;let B=Math.atan2(x,l)*180/Math.PI;return(B>90||B<-90)&&(B+=180),`rotate(${B} ${X} ${D})`}).text(t=>t.label);const kt=S.append("g").attr("class","wardley-trends"),Pt=g.trends.map(t=>{const n=c.get(t.nodeId);if(!n)return null;const s=C(t.targetX),i=E(t.targetY),p=s-n.x,l=i-n.y,x=Math.sqrt(p*p+l*l),f=o.nodeRadius+2,u=x>f?s-p/x*f:s,w=x>f?i-l/x*f:i;return{origin:n,targetX:s,targetY:i,adjustedX2:u,adjustedY2:w}}).filter(t=>t!==null);kt.selectAll("line").data(Pt).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 L=S.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(" "));L.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",o.nodeRadius*2).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),L.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",o.nodeRadius*2).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),L.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",o.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const T=L.filter(t=>t.sourceStrategy==="market");T.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",o.nodeRadius*2).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),L.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",o.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const _=o.nodeRadius*.7,k=o.nodeRadius*1.2;if(T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x).attr("y1",t=>c.get(t.id).y-k).attr("x2",t=>c.get(t.id).x-k*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x-k*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x+k*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x+k*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x).attr("y2",t=>c.get(t.id).y-k).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y-k).attr("r",_).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x-k*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("r",_).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x+k*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("r",_).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),L.filter(t=>t.isPipelineParent===!0).append("rect").attr("x",t=>c.get(t.id).x-m/2).attr("y",t=>c.get(t.id).y-m/2).attr("width",m).attr("height",m).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),L.filter(t=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",t=>{const n=c.get(t.id);let s=t.isPipelineParent?m/2+15:o.nodeRadius+15;return t.sourceStrategy&&(s+=o.nodeRadius+10),n.x+s}).attr("y1",t=>{const n=c.get(t.id),s=t.isPipelineParent?m:o.nodeRadius*2;return n.y-s/2}).attr("x2",t=>{const n=c.get(t.id);let s=t.isPipelineParent?m/2+15:o.nodeRadius+15;return t.sourceStrategy&&(s+=o.nodeRadius+10),n.x+s}).attr("y2",t=>{const n=c.get(t.id),s=t.isPipelineParent?m:o.nodeRadius*2;return n.y+s/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),L.append("text").attr("x",t=>{const n=c.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?n.x+t.labelOffsetX:n.x;let s=o.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetX===void 0&&(s+=10);const i=t.labelOffsetX??s;return n.x+i}).attr("y",t=>{const n=c.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?n.y+t.labelOffsetY:n.y-3;let s=-o.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetY===void 0&&(s-=10);const i=t.labelOffsetY??s;return n.y+i}).attr("class","wardley-node-label").attr("fill",t=>t.className==="evolved"?d.evolutionStroke:t.className==="anchor"?"#000":d.componentLabelColor).attr("font-size",o.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=S.append("g").attr("class","wardley-annotations");if(g.annotations.forEach(n=>{const s=n.coordinates.map(i=>({x:C(i.x),y:E(i.y)}));if(s.length>1)for(let i=0;i<s.length-1;i++)t.append("line").attr("class","wardley-annotation-line").attr("x1",s[i].x).attr("y1",s[i].y).attr("x2",s[i+1].x).attr("y2",s[i+1].y).attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");s.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(n.number)})}),g.annotationsBox){let n=C(g.annotationsBox.x),s=E(g.annotationsBox.y);const i=10,p=16,l=11,x=t.append("g").attr("class","wardley-annotations-box"),f=[...g.annotations].filter(w=>w.text).sort((w,$)=>w.number-$.number),u=[];if(f.forEach((w,$)=>{const X=x.append("text").attr("x",n+i).attr("y",s+i+($+1)*p).attr("font-size",l).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${w.number}. ${w.text}`);u.push(X)}),u.length>0){let w=0,$=0;u.forEach(V=>{const G=V.node(),Mt=G.getComputedTextLength();w=Math.max(w,Mt);const Nt=G.getBBox();$=Math.max($,Nt.height)});const X=w+i*2+105,D=f.length*p+i*2+$/2,B=o.padding,vt=M-o.padding-X,St=o.padding,$t=b-o.padding-D;n=Math.max(B,Math.min(n,vt)),s=Math.max(St,Math.min(s,$t)),u.forEach((V,G)=>{V.attr("x",n+i).attr("y",s+i+(G+1)*p)}),x.insert("rect","text").attr("x",n).attr("y",s).attr("width",X).attr("height",D).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=S.append("g").attr("class","wardley-notes");g.notes.forEach(n=>{const s=C(n.x),i=E(n.y);t.append("text").attr("x",s).attr("y",i).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.text)})}if(g.accelerators.length>0){const t=S.append("g").attr("class","wardley-accelerators");g.accelerators.forEach(n=>{const s=C(n.x),i=E(n.y),p=60,l=30,x=20,f=`
3
3
  M ${s} ${i-l/2}
4
4
  L ${s+p-x} ${i-l/2}
@@ -1,4 +1,4 @@
1
- import{s as gi,g as xi,q as Xt,p as di,a as fi,b as pi,_ as a,l as Yt,I as mi,e as yi,z as bi,D as _t,i as Ai,F as Nt,G as wi,K as Ci,aC as Si,R as Wt}from"./index-BRawc7RA.js";import{i as _i}from"./init-Gi6I4Gst.js";import{o as ki}from"./ordinal-Cboi1Yqb.js";import{l as zt}from"./linear-DTNtBg5h.js";import"./defaultLocale-DX6XiGOO.js";function Ri(e,t,i){e=+e,t=+t,i=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+i;for(var s=-1,n=Math.max(0,Math.ceil((t-e)/i))|0,o=new Array(n);++s<n;)o[s]=e+s*i;return o}function bt(){var e=ki().unknown(void 0),t=e.domain,i=e.range,s=0,n=1,o,u,p=!1,f=0,T=0,P=.5;delete e.unknown;function _(){var y=t().length,E=n<s,v=E?n:s,L=E?s:n;o=(L-v)/Math.max(1,y-f+T*2),p&&(o=Math.floor(o)),v+=(L-v-o*(y-f))*P,u=o*(1-f),p&&(v=Math.round(v),u=Math.round(u));var I=Ri(y).map(function(m){return v+o*m});return i(E?I.reverse():I)}return e.domain=function(y){return arguments.length?(t(y),_()):t()},e.range=function(y){return arguments.length?([s,n]=y,s=+s,n=+n,_()):[s,n]},e.rangeRound=function(y){return[s,n]=y,s=+s,n=+n,p=!0,_()},e.bandwidth=function(){return u},e.step=function(){return o},e.round=function(y){return arguments.length?(p=!!y,_()):p},e.padding=function(y){return arguments.length?(f=Math.min(1,T=+y),_()):f},e.paddingInner=function(y){return arguments.length?(f=Math.min(1,y),_()):f},e.paddingOuter=function(y){return arguments.length?(T=+y,_()):T},e.align=function(y){return arguments.length?(P=Math.max(0,Math.min(1,y)),_()):P},e.copy=function(){return bt(t(),[s,n]).round(p).paddingInner(f).paddingOuter(T).align(P)},_i.apply(_(),arguments)}var At=function(){var e=a(function(F,h,c,g){for(c=c||{},g=F.length;g--;c[F[g]]=h);return c},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],n=[1,5],o=[1,6],u=[1,7],p=[1,5,10,12,14,16,18,19,21,23,34,35,36],f=[1,25],T=[1,26],P=[1,28],_=[1,29],y=[1,30],E=[1,31],v=[1,32],L=[1,33],I=[1,34],m=[1,35],R=[1,36],l=[1,37],W=[1,43],O=[1,42],X=[1,47],Y=[1,50],S=[1,10,12,14,16,18,19,21,23,34,35,36],U=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],b=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],w=[1,64],V={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,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$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",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"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],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:a(function(h,c,g,x,C,r,rt){var d=r.length-1;switch(C){case 5:x.setOrientation(r[d]);break;case 9:x.setDiagramTitle(r[d].text.trim());break;case 12:x.setLineData({text:"",type:"text"},r[d]);break;case 13:x.setLineData(r[d-1],r[d]);break;case 14:x.setBarData({text:"",type:"text"},r[d]);break;case 15:x.setBarData(r[d-1],r[d]);break;case 16:this.$=r[d].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=r[d].trim(),x.setAccDescription(this.$);break;case 19:this.$=r[d-1];break;case 20:this.$=[Number(r[d-2]),...r[d]];break;case 21:this.$=[Number(r[d])];break;case 22:x.setXAxisTitle(r[d]);break;case 23:x.setXAxisTitle(r[d-1]);break;case 24:x.setXAxisTitle({type:"text",text:""});break;case 25:x.setXAxisBand(r[d]);break;case 26:x.setXAxisRangeData(Number(r[d-2]),Number(r[d]));break;case 27:this.$=r[d-1];break;case 28:this.$=[r[d-2],...r[d]];break;case 29:this.$=[r[d]];break;case 30:x.setYAxisTitle(r[d]);break;case 31:x.setYAxisTitle(r[d-1]);break;case 32:x.setYAxisTitle({type:"text",text:""});break;case 33:x.setYAxisRangeData(Number(r[d-2]),Number(r[d]));break;case 37:this.$={text:r[d],type:"text"};break;case 38:this.$={text:r[d],type:"text"};break;case 39:this.$={text:r[d],type:"markdown"};break;case 40:this.$=r[d];break;case 41:this.$=r[d-1]+""+r[d];break}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,34:n,35:o,36:u}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,34:n,35:o,36:u}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:n,35:o,36:u}),{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,34]),e(p,[2,35]),e(p,[2,36]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,34:n,35:o,36:u}),{1:[2,3]},e(p,[2,5]),e(t,[2,7],{4:22,34:n,35:o,36:u}),{11:23,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:39,13:38,24:W,27:O,29:40,30:41,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:45,15:44,27:X,33:46,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:49,17:48,24:Y,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:52,17:51,24:Y,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{20:[1,53]},{22:[1,54]},e(S,[2,18]),{1:[2,2]},e(S,[2,8]),e(S,[2,9]),e(U,[2,37],{40:55,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l}),e(U,[2,38]),e(U,[2,39]),e(b,[2,40]),e(b,[2,42]),e(b,[2,43]),e(b,[2,44]),e(b,[2,45]),e(b,[2,46]),e(b,[2,47]),e(b,[2,48]),e(b,[2,49]),e(b,[2,50]),e(b,[2,51]),e(S,[2,10]),e(S,[2,22],{30:41,29:56,24:W,27:O}),e(S,[2,24]),e(S,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},e(S,[2,11]),e(S,[2,30],{33:60,27:X}),e(S,[2,32]),{31:[1,61]},e(S,[2,12]),{17:62,24:Y},{25:63,27:w},e(S,[2,14]),{17:65,24:Y},e(S,[2,16]),e(S,[2,17]),e(b,[2,41]),e(S,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(S,[2,31]),{27:[1,69]},e(S,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(S,[2,15]),e(S,[2,26]),e(S,[2,27]),{11:59,32:72,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},e(S,[2,33]),e(S,[2,19]),{25:73,27:w},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:a(function(h,c){if(c.recoverable)this.trace(h);else{var g=new Error(h);throw g.hash=c,g}},"parseError"),parse:a(function(h){var c=this,g=[0],x=[],C=[null],r=[],rt=this.table,d="",ct=0,It=0,hi=2,Mt=1,li=r.slice.call(arguments,1),D=Object.create(this.lexer),$={yy:{}};for(var ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ft)&&($.yy[ft]=this.yy[ft]);D.setInput(h,$.yy),$.yy.lexer=D,$.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var pt=D.yylloc;r.push(pt);var ci=D.options&&D.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ui(B){g.length=g.length-2*B,C.length=C.length-B,r.length=r.length-B}a(ui,"popStack");function Vt(){var B;return B=x.pop()||D.lex()||Mt,typeof B!="number"&&(B instanceof Array&&(x=B,B=x.pop()),B=c.symbols_[B]||B),B}a(Vt,"lex");for(var M,q,z,mt,G={},ut,N,Bt,gt;;){if(q=g[g.length-1],this.defaultActions[q]?z=this.defaultActions[q]:((M===null||typeof M>"u")&&(M=Vt()),z=rt[q]&&rt[q][M]),typeof z>"u"||!z.length||!z[0]){var yt="";gt=[];for(ut in rt[q])this.terminals_[ut]&&ut>hi&&gt.push("'"+this.terminals_[ut]+"'");D.showPosition?yt="Parse error on line "+(ct+1)+`:
1
+ import{s as gi,g as xi,q as Xt,p as di,a as fi,b as pi,_ as a,l as Yt,I as mi,e as yi,z as bi,D as _t,i as Ai,F as Nt,G as wi,K as Ci,aC as Si,R as Wt}from"./index-BD36e-tD.js";import{i as _i}from"./init-Gi6I4Gst.js";import{o as ki}from"./ordinal-Cboi1Yqb.js";import{l as zt}from"./linear--7n7iEvd.js";import"./defaultLocale-DX6XiGOO.js";function Ri(e,t,i){e=+e,t=+t,i=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+i;for(var s=-1,n=Math.max(0,Math.ceil((t-e)/i))|0,o=new Array(n);++s<n;)o[s]=e+s*i;return o}function bt(){var e=ki().unknown(void 0),t=e.domain,i=e.range,s=0,n=1,o,u,p=!1,f=0,T=0,P=.5;delete e.unknown;function _(){var y=t().length,E=n<s,v=E?n:s,L=E?s:n;o=(L-v)/Math.max(1,y-f+T*2),p&&(o=Math.floor(o)),v+=(L-v-o*(y-f))*P,u=o*(1-f),p&&(v=Math.round(v),u=Math.round(u));var I=Ri(y).map(function(m){return v+o*m});return i(E?I.reverse():I)}return e.domain=function(y){return arguments.length?(t(y),_()):t()},e.range=function(y){return arguments.length?([s,n]=y,s=+s,n=+n,_()):[s,n]},e.rangeRound=function(y){return[s,n]=y,s=+s,n=+n,p=!0,_()},e.bandwidth=function(){return u},e.step=function(){return o},e.round=function(y){return arguments.length?(p=!!y,_()):p},e.padding=function(y){return arguments.length?(f=Math.min(1,T=+y),_()):f},e.paddingInner=function(y){return arguments.length?(f=Math.min(1,y),_()):f},e.paddingOuter=function(y){return arguments.length?(T=+y,_()):T},e.align=function(y){return arguments.length?(P=Math.max(0,Math.min(1,y)),_()):P},e.copy=function(){return bt(t(),[s,n]).round(p).paddingInner(f).paddingOuter(T).align(P)},_i.apply(_(),arguments)}var At=function(){var e=a(function(F,h,c,g){for(c=c||{},g=F.length;g--;c[F[g]]=h);return c},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],n=[1,5],o=[1,6],u=[1,7],p=[1,5,10,12,14,16,18,19,21,23,34,35,36],f=[1,25],T=[1,26],P=[1,28],_=[1,29],y=[1,30],E=[1,31],v=[1,32],L=[1,33],I=[1,34],m=[1,35],R=[1,36],l=[1,37],W=[1,43],O=[1,42],X=[1,47],Y=[1,50],S=[1,10,12,14,16,18,19,21,23,34,35,36],U=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],b=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],w=[1,64],V={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,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$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",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"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],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:a(function(h,c,g,x,C,r,rt){var d=r.length-1;switch(C){case 5:x.setOrientation(r[d]);break;case 9:x.setDiagramTitle(r[d].text.trim());break;case 12:x.setLineData({text:"",type:"text"},r[d]);break;case 13:x.setLineData(r[d-1],r[d]);break;case 14:x.setBarData({text:"",type:"text"},r[d]);break;case 15:x.setBarData(r[d-1],r[d]);break;case 16:this.$=r[d].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=r[d].trim(),x.setAccDescription(this.$);break;case 19:this.$=r[d-1];break;case 20:this.$=[Number(r[d-2]),...r[d]];break;case 21:this.$=[Number(r[d])];break;case 22:x.setXAxisTitle(r[d]);break;case 23:x.setXAxisTitle(r[d-1]);break;case 24:x.setXAxisTitle({type:"text",text:""});break;case 25:x.setXAxisBand(r[d]);break;case 26:x.setXAxisRangeData(Number(r[d-2]),Number(r[d]));break;case 27:this.$=r[d-1];break;case 28:this.$=[r[d-2],...r[d]];break;case 29:this.$=[r[d]];break;case 30:x.setYAxisTitle(r[d]);break;case 31:x.setYAxisTitle(r[d-1]);break;case 32:x.setYAxisTitle({type:"text",text:""});break;case 33:x.setYAxisRangeData(Number(r[d-2]),Number(r[d]));break;case 37:this.$={text:r[d],type:"text"};break;case 38:this.$={text:r[d],type:"text"};break;case 39:this.$={text:r[d],type:"markdown"};break;case 40:this.$=r[d];break;case 41:this.$=r[d-1]+""+r[d];break}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,34:n,35:o,36:u}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,34:n,35:o,36:u}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:n,35:o,36:u}),{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,34]),e(p,[2,35]),e(p,[2,36]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,34:n,35:o,36:u}),{1:[2,3]},e(p,[2,5]),e(t,[2,7],{4:22,34:n,35:o,36:u}),{11:23,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:39,13:38,24:W,27:O,29:40,30:41,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:45,15:44,27:X,33:46,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:49,17:48,24:Y,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:52,17:51,24:Y,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{20:[1,53]},{22:[1,54]},e(S,[2,18]),{1:[2,2]},e(S,[2,8]),e(S,[2,9]),e(U,[2,37],{40:55,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l}),e(U,[2,38]),e(U,[2,39]),e(b,[2,40]),e(b,[2,42]),e(b,[2,43]),e(b,[2,44]),e(b,[2,45]),e(b,[2,46]),e(b,[2,47]),e(b,[2,48]),e(b,[2,49]),e(b,[2,50]),e(b,[2,51]),e(S,[2,10]),e(S,[2,22],{30:41,29:56,24:W,27:O}),e(S,[2,24]),e(S,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},e(S,[2,11]),e(S,[2,30],{33:60,27:X}),e(S,[2,32]),{31:[1,61]},e(S,[2,12]),{17:62,24:Y},{25:63,27:w},e(S,[2,14]),{17:65,24:Y},e(S,[2,16]),e(S,[2,17]),e(b,[2,41]),e(S,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(S,[2,31]),{27:[1,69]},e(S,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(S,[2,15]),e(S,[2,26]),e(S,[2,27]),{11:59,32:72,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},e(S,[2,33]),e(S,[2,19]),{25:73,27:w},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:a(function(h,c){if(c.recoverable)this.trace(h);else{var g=new Error(h);throw g.hash=c,g}},"parseError"),parse:a(function(h){var c=this,g=[0],x=[],C=[null],r=[],rt=this.table,d="",ct=0,It=0,hi=2,Mt=1,li=r.slice.call(arguments,1),D=Object.create(this.lexer),$={yy:{}};for(var ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ft)&&($.yy[ft]=this.yy[ft]);D.setInput(h,$.yy),$.yy.lexer=D,$.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var pt=D.yylloc;r.push(pt);var ci=D.options&&D.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ui(B){g.length=g.length-2*B,C.length=C.length-B,r.length=r.length-B}a(ui,"popStack");function Vt(){var B;return B=x.pop()||D.lex()||Mt,typeof B!="number"&&(B instanceof Array&&(x=B,B=x.pop()),B=c.symbols_[B]||B),B}a(Vt,"lex");for(var M,q,z,mt,G={},ut,N,Bt,gt;;){if(q=g[g.length-1],this.defaultActions[q]?z=this.defaultActions[q]:((M===null||typeof M>"u")&&(M=Vt()),z=rt[q]&&rt[q][M]),typeof z>"u"||!z.length||!z[0]){var yt="";gt=[];for(ut in rt[q])this.terminals_[ut]&&ut>hi&&gt.push("'"+this.terminals_[ut]+"'");D.showPosition?yt="Parse error on line "+(ct+1)+`:
2
2
  `+D.showPosition()+`
3
3
  Expecting `+gt.join(", ")+", got '"+(this.terminals_[M]||M)+"'":yt="Parse error on line "+(ct+1)+": Unexpected "+(M==Mt?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(yt,{text:D.match,token:this.terminals_[M]||M,line:D.yylineno,loc:pt,expected:gt})}if(z[0]instanceof Array&&z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+q+", token: "+M);switch(z[0]){case 1:g.push(M),C.push(D.yytext),r.push(D.yylloc),g.push(z[1]),M=null,It=D.yyleng,d=D.yytext,ct=D.yylineno,pt=D.yylloc;break;case 2:if(N=this.productions_[z[1]][1],G.$=C[C.length-N],G._$={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},ci&&(G._$.range=[r[r.length-(N||1)].range[0],r[r.length-1].range[1]]),mt=this.performAction.apply(G,[d,It,ct,$.yy,z[1],C,r].concat(li)),typeof mt<"u")return mt;N&&(g=g.slice(0,-1*N*2),C=C.slice(0,-1*N),r=r.slice(0,-1*N)),g.push(this.productions_[z[1]][0]),C.push(G.$),r.push(G._$),Bt=rt[g[g.length-2]][g[g.length-1]],g.push(Bt);break;case 3:return!0}}return!0},"parse")},k=function(){var F={EOF:1,parseError:a(function(c,g){if(this.yy.parser)this.yy.parser.parseError(c,g);else throw new Error(c)},"parseError"),setInput:a(function(h,c){return this.yy=c||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 c=h.match(/(?:\r\n?|\n).*/g);return c?(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 c=h.length,g=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var x=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),g.length-1&&(this.yylineno-=g.length-1);var C=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:g?(g.length===x.length?this.yylloc.first_column:0)+x[x.length-g.length].length-g[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-c]),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(),c=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
@@ -12,8 +12,8 @@
12
12
  if (dark) document.documentElement.classList.add('dark');
13
13
  })();
14
14
  </script>
15
- <script type="module" crossorigin src="/assets/index-BRawc7RA.js"></script>
16
- <link rel="stylesheet" crossorigin href="/assets/index-55P73aS_.css">
15
+ <script type="module" crossorigin src="/assets/index-BD36e-tD.js"></script>
16
+ <link rel="stylesheet" crossorigin href="/assets/index-CGbNOpk9.css">
17
17
  </head>
18
18
  <body>
19
19
  <div id="root"></div>
File without changes
@@ -1469,6 +1469,7 @@ function listPersistedSessions(cwd) {
1469
1469
  if (!entry.isDirectory()) continue;
1470
1470
  const persisted = readPersistedSession(cwd, entry.name);
1471
1471
  if (!persisted) continue;
1472
+ const sync = readSyncRecord(cwd, persisted.id);
1472
1473
  sessions.push({
1473
1474
  id: persisted.id,
1474
1475
  mode: persisted.mode,
@@ -1476,7 +1477,8 @@ function listPersistedSessions(cwd) {
1476
1477
  version: persisted.version,
1477
1478
  createdAt: persisted.createdAt,
1478
1479
  updatedAt: persisted.updatedAt,
1479
- shared: Boolean(readSyncRecord(cwd, persisted.id))
1480
+ shared: Boolean(sync),
1481
+ stale: Boolean(sync) && persisted.version > (sync?.version ?? 0)
1480
1482
  });
1481
1483
  }
1482
1484
  sessions.sort((a, b) => b.updatedAt.localeCompare(a.updatedAt));
@@ -1438,6 +1438,7 @@ function listPersistedSessions(cwd) {
1438
1438
  if (!entry.isDirectory()) continue;
1439
1439
  const persisted = readPersistedSession(cwd, entry.name);
1440
1440
  if (!persisted) continue;
1441
+ const sync = readSyncRecord(cwd, persisted.id);
1441
1442
  sessions.push({
1442
1443
  id: persisted.id,
1443
1444
  mode: persisted.mode,
@@ -1445,7 +1446,8 @@ function listPersistedSessions(cwd) {
1445
1446
  version: persisted.version,
1446
1447
  createdAt: persisted.createdAt,
1447
1448
  updatedAt: persisted.updatedAt,
1448
- shared: Boolean(readSyncRecord(cwd, persisted.id))
1449
+ shared: Boolean(sync),
1450
+ stale: Boolean(sync) && persisted.version > (sync?.version ?? 0)
1449
1451
  });
1450
1452
  }
1451
1453
  sessions.sort((a, b) => b.updatedAt.localeCompare(a.updatedAt));
File without changes
@@ -274,6 +274,11 @@ function writeScripts() {
274
274
  fs4.writeFileSync(WRAPPER_PATH, readScaffold("statusline-wrapper.sh"), { mode: 493 });
275
275
  fs4.writeFileSync(CHIP_PATH, readScaffold("statusline-mcp.sh"), { mode: 493 });
276
276
  }
277
+ function writeBaseScript() {
278
+ fs4.mkdirSync(LK_DIR, { recursive: true });
279
+ fs4.writeFileSync(BASE_PATH, readScaffold("statusline-base.sh"), { mode: 493 });
280
+ return `bash ${BASE_PATH}`;
281
+ }
277
282
  function wrapperCommand(opts) {
278
283
  const env = [];
279
284
  if (opts.show) env.push(`LK_STATUSLINE_SHOW=${opts.show}`);
@@ -282,10 +287,7 @@ function wrapperCommand(opts) {
282
287
  return `${prefix}bash ${WRAPPER_PATH}`;
283
288
  }
284
289
  function activateStatusline(opts = {}) {
285
- const settings = readSettings();
286
- if (!settings) {
287
- return { ok: false, outcome: "no-settings", message: `no ~/.claude/settings.json \u2014 nothing to wrap` };
288
- }
290
+ const settings = readSettings() ?? {};
289
291
  const currentCmd = settings.statusLine?.command;
290
292
  const alreadyWrapped = typeof currentCmd === "string" && currentCmd.includes(WRAPPER_PATH);
291
293
  if (alreadyWrapped) {
@@ -304,20 +306,22 @@ function activateStatusline(opts = {}) {
304
306
  }
305
307
  return { ok: true, outcome: "refreshed", message: "statusline already wrapped \u2014 refreshed chip scripts only" };
306
308
  }
307
- if (!currentCmd) {
308
- return { ok: false, outcome: "no-statusline", message: "no statusLine.command in ~/.claude/settings.json \u2014 launch-kit only extends an existing statusline" };
309
- }
310
309
  writeScripts();
310
+ const scaffolded = !currentCmd;
311
+ const original = scaffolded ? { type: "command", command: writeBaseScript() } : settings.statusLine;
311
312
  const wrapped = {
312
313
  ...settings,
313
314
  statusLine: { type: "command", command: wrapperCommand(opts) },
314
- [ORIGINAL_KEY]: settings.statusLine
315
+ [ORIGINAL_KEY]: original
315
316
  };
316
317
  writeSettings(wrapped);
317
318
  const modeParts = [];
318
319
  if (opts.show) modeParts.push(`chips: ${opts.show}`);
319
320
  if (opts.compact) modeParts.push("compact mode");
320
321
  const modeDesc = modeParts.length > 0 ? ` (${modeParts.join(", ")})` : "";
322
+ if (scaffolded) {
323
+ return { ok: true, outcome: "scaffolded", message: `no statusline found \u2014 scaffolded Claude Code's default base line and wrapped it with chips${modeDesc}; base stashed under ${ORIGINAL_KEY}` };
324
+ }
321
325
  return { ok: true, outcome: "activated", message: `wrapped statusLine.command${modeDesc}; original stashed under ${ORIGINAL_KEY}` };
322
326
  }
323
327
  function deactivateStatusline() {
@@ -327,18 +331,26 @@ function deactivateStatusline() {
327
331
  if (!original) {
328
332
  return { ok: false, outcome: "not-active", message: `no ${ORIGINAL_KEY} in settings.json \u2014 statusline isn't wrapped by launch-kit` };
329
333
  }
330
- const restored = { ...settings, statusLine: original };
334
+ const wasScaffolded = original.command?.includes(BASE_PATH) ?? false;
335
+ const restored = { ...settings };
336
+ if (wasScaffolded) delete restored.statusLine;
337
+ else restored.statusLine = original;
331
338
  delete restored[ORIGINAL_KEY];
332
339
  writeSettings(restored);
333
- for (const p of [WRAPPER_PATH, CHIP_PATH]) {
340
+ const toRemove = wasScaffolded ? [WRAPPER_PATH, CHIP_PATH, BASE_PATH] : [WRAPPER_PATH, CHIP_PATH];
341
+ for (const p of toRemove) {
334
342
  try {
335
343
  fs4.unlinkSync(p);
336
344
  } catch {
337
345
  }
338
346
  }
339
- return { ok: true, outcome: "deactivated", message: "restored original statusLine.command" };
347
+ return {
348
+ ok: true,
349
+ outcome: "deactivated",
350
+ message: wasScaffolded ? "removed launch-kit statusline and scaffolded base line \u2014 back to no statusline" : "restored original statusLine.command"
351
+ };
340
352
  }
341
- var fs4, path4, import_node_os, LK_DIR, WRAPPER_PATH, CHIP_PATH, SETTINGS_PATH, ORIGINAL_KEY;
353
+ var fs4, path4, import_node_os, LK_DIR, WRAPPER_PATH, CHIP_PATH, BASE_PATH, SETTINGS_PATH, ORIGINAL_KEY;
342
354
  var init_statusline_install = __esm({
343
355
  "src/server/statusline-install.ts"() {
344
356
  "use strict";
@@ -348,6 +360,7 @@ var init_statusline_install = __esm({
348
360
  LK_DIR = path4.join((0, import_node_os.homedir)(), ".launchsecure");
349
361
  WRAPPER_PATH = path4.join(LK_DIR, "statusline-wrapper.sh");
350
362
  CHIP_PATH = path4.join(LK_DIR, "statusline-mcp.sh");
363
+ BASE_PATH = path4.join(LK_DIR, "statusline-base.sh");
351
364
  SETTINGS_PATH = path4.join((0, import_node_os.homedir)(), ".claude", "settings.json");
352
365
  ORIGINAL_KEY = "_launchKitStatuslineOriginal";
353
366
  }
@@ -1621,6 +1634,7 @@ var ALL_STEP_IDS = [
1621
1634
  "migrate-safety",
1622
1635
  "ls-marketplace",
1623
1636
  "recall-hook",
1637
+ "project-info",
1624
1638
  "statusline"
1625
1639
  ];
1626
1640
  var PRESETS = {
@@ -1628,6 +1642,7 @@ var PRESETS = {
1628
1642
  refresh: ["resolve", "clone", "install", "onboard", "recall"]
1629
1643
  };
1630
1644
  var LAUNCH_KIT_PKG = "@launchsecure/launch-kit";
1645
+ var LAUNCH_KIT_PKG_LATEST = `${LAUNCH_KIT_PKG}@latest`;
1631
1646
  var LAUNCH_KIT_TOOLS_GUIDE_STATIC_HEAD = `
1632
1647
  Wired in Claude Code (.mcp.json):
1633
1648
  launch-secure \u2014 LS API: work items, comms, secrets, members, board
@@ -1698,6 +1713,7 @@ var KNOWN_BOOL_FLAGS = /* @__PURE__ */ new Set([
1698
1713
  "--no-migrate-safety",
1699
1714
  "--no-ls-marketplace",
1700
1715
  "--no-recall-hook",
1716
+ "--no-project-info",
1701
1717
  "--refresh-scaffolds",
1702
1718
  "--quiet",
1703
1719
  "--force",
@@ -1731,6 +1747,7 @@ function parseArgs(argv) {
1731
1747
  noMigrateSafety: false,
1732
1748
  noLsMarketplace: false,
1733
1749
  noRecallHook: false,
1750
+ noProjectInfo: false,
1734
1751
  refreshScaffolds: false,
1735
1752
  quiet: false,
1736
1753
  force: false,
@@ -1775,6 +1792,10 @@ function parseArgs(argv) {
1775
1792
  args.noRecallHook = true;
1776
1793
  continue;
1777
1794
  }
1795
+ if (raw === "--no-project-info") {
1796
+ args.noProjectInfo = true;
1797
+ continue;
1798
+ }
1778
1799
  if (raw === "--refresh-scaffolds") {
1779
1800
  args.refreshScaffolds = true;
1780
1801
  continue;
@@ -1909,6 +1930,8 @@ Options:
1909
1930
  --no-migrate-safety Skip refreshing the migrate-safety scaffold.
1910
1931
  --no-ls-marketplace Skip refreshing the launch-secure marketplace.
1911
1932
  --no-recall-hook Skip refreshing the recall-hook scaffold.
1933
+ --no-project-info Skip wiring the gitignored CLAUDE.md-imported
1934
+ project-info snapshot (/kit:project-info refreshes it).
1912
1935
  --refresh-scaffolds Force-overwrite migrate-safety files (default is to
1913
1936
  preserve user edits). Use this to pull updates
1914
1937
  published to @launchsecure/launch-kit.
@@ -1944,8 +1967,8 @@ Subcommands:
1944
1967
  Env resolved from --env \u2192 $LS_ENV \u2192 server-side project default \u2192
1945
1968
  single-env auto-pick. See \`launch-kit secrets --help\`.
1946
1969
  statusline activate Wrap ~/.claude/settings.json's statusLine.command so MCP daemon
1947
- chips (recall, chart, deck, council) get appended. Refuses to
1948
- create one if none exists \u2014 additive only.
1970
+ chips (recall, chart, deck, council) get appended. If no
1971
+ statusline exists, scaffolds Claude Code's default base line first.
1949
1972
  statusline deactivate Restore the original statusLine.command and remove kit scripts.
1950
1973
 
1951
1974
  Usage:
@@ -2016,7 +2039,7 @@ Options:
2016
2039
 
2017
2040
  Step selection (one-command flow \u2014 compose over the preset):
2018
2041
  Steps: resolve, clone, cred, mcp, gitignore, install, onboard, recall,
2019
- migrate-safety, ls-marketplace, recall-hook, statusline
2042
+ migrate-safety, ls-marketplace, recall-hook, project-info, statusline
2020
2043
  --preset=<name> init (everything) or refresh (skips resolve/clone/
2021
2044
  install/onboard/recall). Default: init. \`init\` and
2022
2045
  \`refresh\` subcommands just select this.
@@ -2322,19 +2345,19 @@ function buildLaunchKitMcpEntries(cfg) {
2322
2345
  },
2323
2346
  "launch-chart": {
2324
2347
  command: "npx",
2325
- args: ["-y", "-p", LAUNCH_KIT_PKG, "launch-chart"]
2348
+ args: ["-y", "-p", LAUNCH_KIT_PKG_LATEST, "launch-chart"]
2326
2349
  },
2327
2350
  "launch-deck": {
2328
2351
  command: "npx",
2329
- args: ["-y", "-p", LAUNCH_KIT_PKG, "launch-deck"]
2352
+ args: ["-y", "-p", LAUNCH_KIT_PKG_LATEST, "launch-deck"]
2330
2353
  },
2331
2354
  "launch-orbit": {
2332
2355
  command: "npx",
2333
- args: ["-y", "-p", LAUNCH_KIT_PKG, "launch-orbit", "mcp"]
2356
+ args: ["-y", "-p", LAUNCH_KIT_PKG_LATEST, "launch-orbit", "mcp"]
2334
2357
  },
2335
2358
  "launch-recall": {
2336
2359
  command: "npx",
2337
- args: ["-y", "-p", LAUNCH_KIT_PKG, "launch-recall", "mcp"]
2360
+ args: ["-y", "-p", LAUNCH_KIT_PKG_LATEST, "launch-recall", "mcp"]
2338
2361
  }
2339
2362
  };
2340
2363
  }
@@ -2354,6 +2377,18 @@ function mergeMcpEntry(existing, ours) {
2354
2377
  }
2355
2378
  return merged;
2356
2379
  }
2380
+ function pinLaunchKitLatest(servers) {
2381
+ const fixed = [];
2382
+ for (const [name, entry] of Object.entries(servers)) {
2383
+ if (entry.command !== "npx" || !Array.isArray(entry.args)) continue;
2384
+ const i = entry.args.indexOf(LAUNCH_KIT_PKG);
2385
+ if (i !== -1) {
2386
+ entry.args[i] = LAUNCH_KIT_PKG_LATEST;
2387
+ fixed.push(name);
2388
+ }
2389
+ }
2390
+ return fixed;
2391
+ }
2357
2392
  function mergeMcpFile(targetDir, launchKitEntries) {
2358
2393
  const p = path5.join(targetDir, ".mcp.json");
2359
2394
  const hadExisting = fs5.existsSync(p);
@@ -2379,12 +2414,14 @@ function mergeMcpFile(targetDir, launchKitEntries) {
2379
2414
  merged.mcpServers[name] = entry;
2380
2415
  }
2381
2416
  }
2417
+ const pinned = pinLaunchKitLatest(merged.mcpServers);
2382
2418
  if (DRY_RUN) {
2383
2419
  const action = hadExisting && existingServerCount > 0 ? "would merge into" : "would write";
2384
- dryNote(`${action} .mcp.json \u2014 overwriting [${overwrites.join(", ") || "none"}], adding [${additions.join(", ") || "none"}]`);
2420
+ dryNote(`${action} .mcp.json \u2014 overwriting [${overwrites.join(", ") || "none"}], adding [${additions.join(", ") || "none"}], pinning @latest on [${pinned.join(", ") || "none"}]`);
2385
2421
  return { status: "skipped", summary: "(dry-run)" };
2386
2422
  }
2387
2423
  fs5.writeFileSync(p, JSON.stringify(merged, null, 2) + "\n", "utf-8");
2424
+ if (pinned.length > 0) info(`pinned @latest on ${pinned.length} launch-kit MCP entr${pinned.length === 1 ? "y" : "ies"}: ${pinned.join(", ")}`);
2388
2425
  const verb = hadExisting && existingServerCount > 0 ? "merged" : "wrote";
2389
2426
  ok(`${verb === "merged" ? "merged into" : "wrote"} .mcp.json (${Object.keys(launchKitEntries).length} launch-kit entries)`);
2390
2427
  const total = Object.keys(launchKitEntries).length;
@@ -2470,14 +2507,14 @@ function runRecallInit(repoDir) {
2470
2507
  const recallEntry = path5.resolve(__dirname, "recall-entry.js");
2471
2508
  const useSibling = fs5.existsSync(recallEntry);
2472
2509
  const cmd = useSibling ? process.execPath : "npx";
2473
- const args = useSibling ? [recallEntry, "init"] : ["-y", "-p", LAUNCH_KIT_PKG, "launch-recall", "init"];
2510
+ const args = useSibling ? [recallEntry, "init"] : ["-y", "-p", LAUNCH_KIT_PKG_LATEST, "launch-recall", "init"];
2474
2511
  if (DRY_RUN) {
2475
2512
  dryNote(`would run launch-recall init: ${cmd} ${args.join(" ")} (cwd: ${repoDir})`);
2476
2513
  return;
2477
2514
  }
2478
2515
  const res = (0, import_node_child_process3.spawnSync)(cmd, args, { cwd: repoDir, stdio: "inherit" });
2479
2516
  if (res.status !== 0) {
2480
- info(`\u26A0 launch-recall init failed (exit ${res.status}). Main onboarding is complete \u2014 you can retry later: cd ${path5.basename(repoDir)} && npx -y -p ${LAUNCH_KIT_PKG} launch-recall init`);
2517
+ info(`\u26A0 launch-recall init failed (exit ${res.status}). Main onboarding is complete \u2014 you can retry later: cd ${path5.basename(repoDir)} && npx -y -p ${LAUNCH_KIT_PKG_LATEST} launch-recall init`);
2481
2518
  return;
2482
2519
  }
2483
2520
  ok(`launch-recall ready (shadow git initialized)`);
@@ -2768,7 +2805,7 @@ function wireRecallHook(targetDir) {
2768
2805
  }
2769
2806
  function tryActivateStatusline() {
2770
2807
  if (DRY_RUN) {
2771
- dryNote(`would wrap ~/.claude/settings.json statusLine.command with launch-kit's MCP chip wrapper (skips silently if no statusline configured)`);
2808
+ dryNote(`would wrap ~/.claude/settings.json statusLine.command with launch-kit's MCP chip wrapper (scaffolds Claude Code's default base line first if none is configured)`);
2772
2809
  return { status: "skipped", summary: "(dry-run)" };
2773
2810
  }
2774
2811
  const res = activateStatusline();
@@ -2776,6 +2813,10 @@ function tryActivateStatusline() {
2776
2813
  ok(`statusline wrapped \u2014 MCP chips will render alongside your existing statusline next session`);
2777
2814
  return { status: "ok", summary: "wrapped \u2014 MCP chips render next session" };
2778
2815
  }
2816
+ if (res.ok && res.outcome === "scaffolded") {
2817
+ ok(`no statusline found \u2014 scaffolded Claude Code's default base line; MCP chips render alongside it next session`);
2818
+ return { status: "ok", summary: "scaffolded default base line + chips" };
2819
+ }
2779
2820
  if (res.ok && res.outcome === "refreshed") {
2780
2821
  info(`statusline already wrapped \u2014 refreshed chip scripts`);
2781
2822
  return { status: "ok", summary: "chip scripts refreshed" };
@@ -2834,8 +2875,8 @@ async function main2() {
2834
2875
  if (action === "activate") res = activateStatusline2({ show: showArg, compact: compactArg });
2835
2876
  else if (action === "deactivate") res = deactivateStatusline2();
2836
2877
  else fail3(`Unknown statusline action: "${action}". Supported: activate, deactivate.`);
2837
- if (res.ok) ok(`statusline ${res.outcome} \u2014 ${res.message}`);
2838
- else info(`statusline ${res.outcome} \u2014 ${res.message}`);
2878
+ const mark = res.ok ? "\u2713" : "\u2717";
2879
+ console.log(`[launch-kit] ${mark} statusline ${res.outcome} \u2014 ${res.message}`);
2839
2880
  return;
2840
2881
  }
2841
2882
  if (subcommand === "secrets") {
@@ -2913,6 +2954,7 @@ function resolveEnabledSteps(args) {
2913
2954
  if (args.noMigrateSafety) enabled.delete("migrate-safety");
2914
2955
  if (args.noLsMarketplace) enabled.delete("ls-marketplace");
2915
2956
  if (args.noRecallHook) enabled.delete("recall-hook");
2957
+ if (args.noProjectInfo) enabled.delete("project-info");
2916
2958
  return enabled;
2917
2959
  }
2918
2960
  async function stepResolve(ctx) {
@@ -3142,6 +3184,90 @@ function stepStatusline(_ctx) {
3142
3184
  const slR = tryActivateStatusline();
3143
3185
  if (slR) phase("statusline", slR);
3144
3186
  }
3187
+ var PROJECT_INFO_REL = ".claude/launch-kit/project-info.md";
3188
+ function ensureClaudeMdImport(targetDir) {
3189
+ const p = path5.join(targetDir, "CLAUDE.md");
3190
+ const importLine = `@${PROJECT_INFO_REL}`;
3191
+ const block = `<!-- launch-kit:project-info \u2014 generated import; safe to move, keep the line -->
3192
+ ${importLine}
3193
+ <!-- /launch-kit:project-info -->
3194
+ `;
3195
+ if (fs5.existsSync(p)) {
3196
+ const content = fs5.readFileSync(p, "utf-8");
3197
+ if (content.includes(importLine)) return "in-sync";
3198
+ if (DRY_RUN) {
3199
+ dryNote(`would add ${importLine} import to CLAUDE.md`);
3200
+ return "added";
3201
+ }
3202
+ fs5.writeFileSync(p, content + (content.endsWith("\n") ? "" : "\n") + "\n" + block, "utf-8");
3203
+ return "added";
3204
+ }
3205
+ if (DRY_RUN) {
3206
+ dryNote(`would create CLAUDE.md with ${importLine} import`);
3207
+ return "created";
3208
+ }
3209
+ fs5.writeFileSync(p, `# CLAUDE.md
3210
+
3211
+ ${block}`, "utf-8");
3212
+ return "created";
3213
+ }
3214
+ function renderProjectInfoSkeleton(ctx) {
3215
+ const cfg = ctx.cfg;
3216
+ const projectName = ctx.resolved?.projectName ?? cfg.projectSlug;
3217
+ const repo = ctx.resolved?.repositoryUrl ?? "\u2014";
3218
+ const todo = "_Not populated yet \u2014 run `/kit:project-info` in Claude Code._";
3219
+ return [
3220
+ `# Project Info \u2014 ${projectName}`,
3221
+ ``,
3222
+ `<!-- launch-kit:generated \u2014 local, git-ignored snapshot. NOT a source of truth. -->`,
3223
+ `> Wired by \`launch-kit\` init. This is a **local, git-ignored snapshot** of`,
3224
+ `> project facts so Claude doesn't re-query them every session. Members,`,
3225
+ `> providers, and environments are filled from LaunchSecure by the`,
3226
+ `> \`/kit:project-info\` skill \u2014 run it to populate or refresh. Treat as a`,
3227
+ `> cache: it can go stale, so re-run after team/provider/env changes.`,
3228
+ ``,
3229
+ `## Identity`,
3230
+ `- **Org:** ${cfg.orgSlug}`,
3231
+ `- **Project:** ${projectName} (\`${cfg.projectSlug}\`)`,
3232
+ `- **Server:** ${cfg.serverUrl}`,
3233
+ `- **Course:** ${ctx.courseName ?? "\u2014"}`,
3234
+ `- **Repo:** ${repo}`,
3235
+ ``,
3236
+ `## Members`,
3237
+ todo,
3238
+ ``,
3239
+ `## Providers / integrations`,
3240
+ todo,
3241
+ ``,
3242
+ `## Environments`,
3243
+ todo,
3244
+ ``
3245
+ ].join("\n");
3246
+ }
3247
+ function stepProjectInfo(ctx) {
3248
+ if (!ctx.cfg) {
3249
+ phase("project-info", { status: "skipped", summary: "no cred resolved" });
3250
+ return;
3251
+ }
3252
+ ensureGitignoreLine(ctx.targetDir, PROJECT_INFO_REL);
3253
+ const importResult = ensureClaudeMdImport(ctx.targetDir);
3254
+ const dest = path5.join(ctx.targetDir, PROJECT_INFO_REL);
3255
+ const existed = fs5.existsSync(dest);
3256
+ if (!existed) {
3257
+ if (DRY_RUN) {
3258
+ dryNote(`would write ${PROJECT_INFO_REL} identity skeleton`);
3259
+ } else {
3260
+ fs5.mkdirSync(path5.dirname(dest), { recursive: true });
3261
+ fs5.writeFileSync(dest, renderProjectInfoSkeleton(ctx), "utf-8");
3262
+ ok(`wrote ${PROJECT_INFO_REL}`);
3263
+ }
3264
+ }
3265
+ const summary = existed ? `kept file \xB7 CLAUDE.md ${importResult} \xB7 /kit:project-info to refresh` : `wrote skeleton \xB7 CLAUDE.md ${importResult} \xB7 /kit:project-info to populate`;
3266
+ phase("project-info", {
3267
+ status: existed && importResult === "in-sync" ? "in-sync" : "ok",
3268
+ summary
3269
+ });
3270
+ }
3145
3271
  var STEPS = [
3146
3272
  { id: "resolve", run: stepResolve },
3147
3273
  { id: "clone", requires: ["resolve"], run: stepClone },
@@ -3154,6 +3280,7 @@ var STEPS = [
3154
3280
  { id: "migrate-safety", run: stepMigrateSafety },
3155
3281
  { id: "ls-marketplace", run: stepLsMarketplace },
3156
3282
  { id: "recall-hook", run: stepRecallHook },
3283
+ { id: "project-info", requires: ["cred"], run: stepProjectInfo },
3157
3284
  { id: "statusline", run: stepStatusline }
3158
3285
  ];
3159
3286
  function buildCtx(args, enabled) {
File without changes
File without changes
File without changes
@@ -608,7 +608,7 @@ var require_package = __commonJS({
608
608
  "package.json"(exports2, module2) {
609
609
  module2.exports = {
610
610
  name: "@launchsecure/launch-kit",
611
- version: "0.0.38",
611
+ version: "0.0.39",
612
612
  description: "LaunchSecure toolkit \u2014 launch-sequencer (pipeline runner + terminal bridge), launch-radar (feedback webhook receiver), launch-chart (project graph MCP), launch-deck (visual playground MCP), launch-kit-beacon (feedback Web Component), launch-recall (file-watcher backup). launch-pod is the container image these run inside.",
613
613
  license: "MIT",
614
614
  author: "LaunchSecure - AutomateWithUs",
@@ -19868,6 +19868,23 @@ async function podsList(_state) {
19868
19868
  }
19869
19869
  return { pods };
19870
19870
  }
19871
+ async function podsPurgeAll(state) {
19872
+ const { pods } = await podsList(state);
19873
+ const projects = [];
19874
+ for (const pod of pods) {
19875
+ try {
19876
+ await stopAndRemove(pod.containerName);
19877
+ if (pod.projectSlug) {
19878
+ projects.push(pod.projectSlug);
19879
+ await dockerVolumeRmIfExists(`${VOLUME_PREFIX}${pod.projectSlug}-workspace`);
19880
+ await dockerVolumeRmIfExists(`${VOLUME_PREFIX}${pod.projectSlug}-claude`);
19881
+ }
19882
+ } catch (err) {
19883
+ console.warn(`[rover] purge of "${pod.containerName}" failed: ${err instanceof Error ? err.message : String(err)}`);
19884
+ }
19885
+ }
19886
+ return { purged: pods.length, projects };
19887
+ }
19871
19888
  async function stopAndRemove(containerName) {
19872
19889
  await dockerStopIfExists(containerName);
19873
19890
  await dockerRmIfExists(containerName);
@@ -20124,6 +20141,32 @@ async function handleRequest(req, res, state) {
20124
20141
  return json(res, 500, { error: err instanceof Error ? err.message : "internal_error" });
20125
20142
  }
20126
20143
  }
20144
+ if (method === "POST" && path === "/shutdown") {
20145
+ const rawBody = await readBody(req);
20146
+ const sigHeader = req.headers["x-ls-signature"];
20147
+ const sigStr = Array.isArray(sigHeader) ? sigHeader[0] : sigHeader;
20148
+ const failure = verifySignature(state.secret, rawBody, sigStr);
20149
+ if (failure) {
20150
+ console.warn(`[rover] POST /shutdown \u2192 401 (${failure})`);
20151
+ return json(res, 401, { error: "invalid_signature" });
20152
+ }
20153
+ json(res, 200, { ok: true, shuttingDown: true });
20154
+ void (async () => {
20155
+ try {
20156
+ const result = await podsPurgeAll(state);
20157
+ console.log(`[rover] /shutdown \u2014 purged ${result.purged} pod(s); stopping daemon`);
20158
+ } catch (err) {
20159
+ console.error("[rover] /shutdown pod purge failed:", err);
20160
+ } finally {
20161
+ try {
20162
+ process.kill(process.pid, "SIGTERM");
20163
+ } catch {
20164
+ process.exit(0);
20165
+ }
20166
+ }
20167
+ })();
20168
+ return;
20169
+ }
20127
20170
  return json(res, 404, { error: "not_found", path });
20128
20171
  }
20129
20172
  function json(res, status, body) {