sshler 1.3.0__tar.gz → 1.3.1__tar.gz

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 (384) hide show
  1. {sshler-1.3.0/sshler.egg-info → sshler-1.3.1}/PKG-INFO +1 -1
  2. {sshler-1.3.0 → sshler-1.3.1}/pyproject.toml +1 -1
  3. {sshler-1.3.0 → sshler-1.3.1}/sshler/api/boxes.py +6 -4
  4. {sshler-1.3.0 → sshler-1.3.1}/sshler/api/claude_sessions.py +7 -2
  5. {sshler-1.3.0 → sshler-1.3.1}/sshler/api/file_contract.py +4 -2
  6. {sshler-1.3.0 → sshler-1.3.1}/sshler/api/files.py +1 -2
  7. {sshler-1.3.0 → sshler-1.3.1}/sshler/api/local_files.py +97 -8
  8. {sshler-1.3.0 → sshler-1.3.1}/sshler/api/recovery.py +2 -0
  9. {sshler-1.3.0 → sshler-1.3.1}/sshler/api/remote.py +25 -0
  10. {sshler-1.3.0 → sshler-1.3.1}/sshler/api/remote_files.py +48 -8
  11. {sshler-1.3.0 → sshler-1.3.1}/sshler/snapshot.py +41 -7
  12. sshler-1.3.0/sshler/static/dist/assets/Alert-DIRa-mLO.js → sshler-1.3.1/sshler/static/dist/assets/Alert-jRvWI2WC.js +1 -1
  13. sshler-1.3.0/sshler/static/dist/assets/ArtifactsView-DBlFlU7Q.js → sshler-1.3.1/sshler/static/dist/assets/ArtifactsView-DlJSiZGZ.js +1 -1
  14. sshler-1.3.0/sshler/static/dist/assets/BoxesView-zc5PoApp.js → sshler-1.3.1/sshler/static/dist/assets/BoxesView-BC5znPo4.js +1 -1
  15. sshler-1.3.1/sshler/static/dist/assets/ClaudeSessionsView-CnKaHEEU.js +137 -0
  16. sshler-1.3.1/sshler/static/dist/assets/ClaudeSessionsView-J38dToU5.css +1 -0
  17. sshler-1.3.0/sshler/static/dist/assets/CommanderView-BXUhbX5j.js → sshler-1.3.1/sshler/static/dist/assets/CommanderView-DydCX36L.js +1 -1
  18. sshler-1.3.0/sshler/static/dist/assets/ContextMenu-Bf1q3yh_.js → sshler-1.3.1/sshler/static/dist/assets/ContextMenu-DryX3Hez.js +1 -1
  19. sshler-1.3.0/sshler/static/dist/assets/DiffView-C0go8e8Z.css → sshler-1.3.1/sshler/static/dist/assets/DiffView-Bd2YUXEh.css +1 -1
  20. sshler-1.3.1/sshler/static/dist/assets/DiffView-CaOFglH-.js +9 -0
  21. sshler-1.3.0/sshler/static/dist/assets/DirectoryPickerModal-V3skxPqP.js → sshler-1.3.1/sshler/static/dist/assets/DirectoryPickerModal-DrCOl01D.js +1 -1
  22. sshler-1.3.0/sshler/static/dist/assets/FilesView-DgaZaJ8F.js → sshler-1.3.1/sshler/static/dist/assets/FilesView-Be8J49T-.js +10 -10
  23. sshler-1.3.0/sshler/static/dist/assets/FilesView-BKMMXyhy.css → sshler-1.3.1/sshler/static/dist/assets/FilesView-ZU_L2alt.css +1 -1
  24. sshler-1.3.0/sshler/static/dist/assets/GitBadge-DXhwNg1u.js → sshler-1.3.1/sshler/static/dist/assets/GitBadge-CnKJtAGb.js +1 -1
  25. sshler-1.3.0/sshler/static/dist/assets/InputNumber-vaLjPFY8.js → sshler-1.3.1/sshler/static/dist/assets/InputNumber-twOkKAEo.js +1 -1
  26. sshler-1.3.0/sshler/static/dist/assets/LoginView-CjBkF355.js → sshler-1.3.1/sshler/static/dist/assets/LoginView-pyknQc1U.js +1 -1
  27. sshler-1.3.0/sshler/static/dist/assets/MultiTerminalView-y_VKl809.js → sshler-1.3.1/sshler/static/dist/assets/MultiTerminalView-C6Chi4e9.js +1 -1
  28. sshler-1.3.1/sshler/static/dist/assets/OverviewView-CA09wOlC.css +1 -0
  29. sshler-1.3.1/sshler/static/dist/assets/OverviewView-DSq8n51R.js +1 -0
  30. sshler-1.3.0/sshler/static/dist/assets/Popconfirm-BNVwQU1b.js → sshler-1.3.1/sshler/static/dist/assets/Popconfirm-GAogkxIj.js +1 -1
  31. sshler-1.3.0/sshler/static/dist/assets/Progress-BZXXtjea.js → sshler-1.3.1/sshler/static/dist/assets/Progress-Cr4ocr-T.js +1 -1
  32. sshler-1.3.0/sshler/static/dist/assets/ProgressView-o8nNcvpx.js → sshler-1.3.1/sshler/static/dist/assets/ProgressView-DOg2c__b.js +1 -1
  33. sshler-1.3.0/sshler/static/dist/assets/SettingsView-a2sUA5vI.js → sshler-1.3.1/sshler/static/dist/assets/SettingsView-CXh_Z9eJ.js +1 -1
  34. sshler-1.3.0/sshler/static/dist/assets/Switch-qbvDBLs_.js → sshler-1.3.1/sshler/static/dist/assets/Switch-DrpUt9Nz.js +1 -1
  35. sshler-1.3.0/sshler/static/dist/assets/TerminalView-CtuLeLw6.js → sshler-1.3.1/sshler/static/dist/assets/TerminalView-D7JN-b_L.js +1 -1
  36. sshler-1.3.0/sshler/static/dist/assets/abnfDiagram-S7VZAUFO-Dl62XIa8.js → sshler-1.3.1/sshler/static/dist/assets/abnfDiagram-S7VZAUFO-BXmyzah1.js +1 -1
  37. sshler-1.3.0/sshler/static/dist/assets/architectureDiagram-YGSQEFNW-CX2aIRmb.js → sshler-1.3.1/sshler/static/dist/assets/architectureDiagram-YGSQEFNW-DbJJ89EZ.js +1 -1
  38. sshler-1.3.0/sshler/static/dist/assets/blockDiagram-APKKGZFW-h8c8DRn_.js → sshler-1.3.1/sshler/static/dist/assets/blockDiagram-APKKGZFW-BlKltNxu.js +1 -1
  39. sshler-1.3.0/sshler/static/dist/assets/bootstrap-DMKDM0gE.js → sshler-1.3.1/sshler/static/dist/assets/bootstrap-C2zuJ98F.js +1 -1
  40. sshler-1.3.0/sshler/static/dist/assets/c4Diagram-KJ2TOQU5-CETSG46L.js → sshler-1.3.1/sshler/static/dist/assets/c4Diagram-KJ2TOQU5-Bz9i7KF7.js +1 -1
  41. sshler-1.3.0/sshler/static/dist/assets/chunk-6MUBBAK2-QI-PvRu8.js → sshler-1.3.1/sshler/static/dist/assets/chunk-6MUBBAK2-B2NLXqT4.js +1 -1
  42. sshler-1.3.0/sshler/static/dist/assets/chunk-AXFCVDMN-B6oAzgGh.js → sshler-1.3.1/sshler/static/dist/assets/chunk-AXFCVDMN-DakP4-YK.js +1 -1
  43. sshler-1.3.0/sshler/static/dist/assets/chunk-BG4553SI-Cz90o6c2.js → sshler-1.3.1/sshler/static/dist/assets/chunk-BG4553SI-BfRfmhh7.js +1 -1
  44. sshler-1.3.0/sshler/static/dist/assets/chunk-DQASFODM-CBQyowXs.js → sshler-1.3.1/sshler/static/dist/assets/chunk-DQASFODM-DXrWP-kx.js +1 -1
  45. sshler-1.3.0/sshler/static/dist/assets/chunk-HFQBQIA3-BNSGSFhc.js → sshler-1.3.1/sshler/static/dist/assets/chunk-HFQBQIA3-xcauvTnF.js +1 -1
  46. sshler-1.3.0/sshler/static/dist/assets/chunk-KQLB2F66-W3LJLXaT.js → sshler-1.3.1/sshler/static/dist/assets/chunk-KQLB2F66-61rBFBXq.js +1 -1
  47. sshler-1.3.0/sshler/static/dist/assets/chunk-KS47KZWR-CiMX3_TA.js → sshler-1.3.1/sshler/static/dist/assets/chunk-KS47KZWR-UJvKAHG6.js +1 -1
  48. sshler-1.3.0/sshler/static/dist/assets/chunk-LEVMRMFU-QVTambqF.js → sshler-1.3.1/sshler/static/dist/assets/chunk-LEVMRMFU--KidKXNQ.js +1 -1
  49. sshler-1.3.0/sshler/static/dist/assets/chunk-M57EVK23-DaZQyPnU.js → sshler-1.3.1/sshler/static/dist/assets/chunk-M57EVK23-Dmk5ucte.js +1 -1
  50. sshler-1.3.0/sshler/static/dist/assets/chunk-OY52VR5R-PoE6xPk0.js → sshler-1.3.1/sshler/static/dist/assets/chunk-OY52VR5R-kiRVNVft.js +1 -1
  51. sshler-1.3.0/sshler/static/dist/assets/chunk-QB3YPZ4I-DTzHDg1d.js → sshler-1.3.1/sshler/static/dist/assets/chunk-QB3YPZ4I-D-lBU0DO.js +1 -1
  52. sshler-1.3.0/sshler/static/dist/assets/chunk-R3KSYZAL-Co4cu03u.js → sshler-1.3.1/sshler/static/dist/assets/chunk-R3KSYZAL-COXJcTO9.js +1 -1
  53. sshler-1.3.0/sshler/static/dist/assets/chunk-STOXU5M4-DQS_GffP.js → sshler-1.3.1/sshler/static/dist/assets/chunk-STOXU5M4-C4HInLDb.js +1 -1
  54. sshler-1.3.0/sshler/static/dist/assets/chunk-TU62E6Q5-DgV5rx-o.js → sshler-1.3.1/sshler/static/dist/assets/chunk-TU62E6Q5-Ch6w8vFU.js +1 -1
  55. sshler-1.3.0/sshler/static/dist/assets/chunk-X4PVCEUW-Nu_AGfdq.js → sshler-1.3.1/sshler/static/dist/assets/chunk-X4PVCEUW-BqUQcqSD.js +1 -1
  56. sshler-1.3.0/sshler/static/dist/assets/classDiagram-v2-L25IHNXF-Cy3mefYn.js → sshler-1.3.1/sshler/static/dist/assets/classDiagram-v2-L25IHNXF-BOffEKFc.js +1 -1
  57. sshler-1.3.0/sshler/static/dist/assets/cynefinDiagram-L36ESFBY-CitA4c9o.js → sshler-1.3.1/sshler/static/dist/assets/cynefinDiagram-L36ESFBY-BrC5P4fC.js +1 -1
  58. sshler-1.3.0/sshler/static/dist/assets/dagre-SPEB5RXH-CgWivpDz.js → sshler-1.3.1/sshler/static/dist/assets/dagre-SPEB5RXH-ZbpHQSdw.js +1 -1
  59. sshler-1.3.0/sshler/static/dist/assets/diagram-3B7GL73J-C4x_nMmI.js → sshler-1.3.1/sshler/static/dist/assets/diagram-3B7GL73J-CAawnK4Q.js +1 -1
  60. sshler-1.3.0/sshler/static/dist/assets/diagram-DNEMPZML-O7cqJkdu.js → sshler-1.3.1/sshler/static/dist/assets/diagram-DNEMPZML-D4qPMJcE.js +1 -1
  61. sshler-1.3.0/sshler/static/dist/assets/diagram-L3MUGCDN-C8OSMZVz.js → sshler-1.3.1/sshler/static/dist/assets/diagram-L3MUGCDN-yCVyI7Su.js +1 -1
  62. sshler-1.3.0/sshler/static/dist/assets/diagram-LA4NIPWU-DtrA47zY.js → sshler-1.3.1/sshler/static/dist/assets/diagram-LA4NIPWU-CelyOCFL.js +1 -1
  63. sshler-1.3.0/sshler/static/dist/assets/diagram-MHCOC4E2-DtH_Z1dL.js → sshler-1.3.1/sshler/static/dist/assets/diagram-MHCOC4E2-CgsQUkRP.js +1 -1
  64. sshler-1.3.0/sshler/static/dist/assets/diagram-XPFHEONP-D0vdRQt6.js → sshler-1.3.1/sshler/static/dist/assets/diagram-XPFHEONP-MMZNgHhI.js +1 -1
  65. sshler-1.3.1/sshler/static/dist/assets/dirLinks-DYgN3kuT.js +1 -0
  66. sshler-1.3.0/sshler/static/dist/assets/ebnfDiagram-UZSYDL2S-jUftlOMT.js → sshler-1.3.1/sshler/static/dist/assets/ebnfDiagram-UZSYDL2S-D2GPcmHD.js +1 -1
  67. sshler-1.3.0/sshler/static/dist/assets/elk-XV6XMXQE-CkUwtCDs.js → sshler-1.3.1/sshler/static/dist/assets/elk-XV6XMXQE-V9S6bpy2.js +1 -1
  68. sshler-1.3.0/sshler/static/dist/assets/erDiagram-EYBAPDEH-DZvAyEAy.js → sshler-1.3.1/sshler/static/dist/assets/erDiagram-EYBAPDEH-Bv43gdjQ.js +1 -1
  69. sshler-1.3.0/sshler/static/dist/assets/favorites-CPj5Zj-5.js → sshler-1.3.1/sshler/static/dist/assets/favorites-CnJj5YSa.js +1 -1
  70. sshler-1.3.1/sshler/static/dist/assets/flowDiagram-MALGAFMO-CgOJX1Nx.js +1 -0
  71. sshler-1.3.0/sshler/static/dist/assets/ganttDiagram-23REXITY-DgFgtUtE.js → sshler-1.3.1/sshler/static/dist/assets/ganttDiagram-23REXITY-BwTvnO8q.js +1 -1
  72. sshler-1.3.0/sshler/static/dist/assets/gitGraphDiagram-STJD7YCW-fIg-hNNm.js → sshler-1.3.1/sshler/static/dist/assets/gitGraphDiagram-STJD7YCW-B3sy0acO.js +1 -1
  73. sshler-1.3.0/sshler/static/dist/assets/http-5jBZtK3s.js → sshler-1.3.1/sshler/static/dist/assets/http-C62oEuQ5.js +2 -2
  74. sshler-1.3.0/sshler/static/dist/assets/index-D2Lnc2ko.css → sshler-1.3.1/sshler/static/dist/assets/index-CQsIhqEW.css +1 -1
  75. sshler-1.3.0/sshler/static/dist/assets/index-D6bev0bd.js → sshler-1.3.1/sshler/static/dist/assets/index-zvBSG0-h.js +3 -3
  76. sshler-1.3.0/sshler/static/dist/assets/infoDiagram-KBXO4MBG-BVVfHFcQ.js → sshler-1.3.1/sshler/static/dist/assets/infoDiagram-KBXO4MBG-DRLCCKBZ.js +1 -1
  77. sshler-1.3.0/sshler/static/dist/assets/ishikawaDiagram-M35NCXHK-CqGTk0dp.js → sshler-1.3.1/sshler/static/dist/assets/ishikawaDiagram-M35NCXHK-CaFZPrbQ.js +1 -1
  78. sshler-1.3.0/sshler/static/dist/assets/journeyDiagram-OPLOXDXO-BFB5FKSr.js → sshler-1.3.1/sshler/static/dist/assets/journeyDiagram-OPLOXDXO-BbiLA9Y1.js +1 -1
  79. sshler-1.3.0/sshler/static/dist/assets/kanban-definition-BZKZHSQY-DSSNLkvk.js → sshler-1.3.1/sshler/static/dist/assets/kanban-definition-BZKZHSQY-DJkD-KJ9.js +1 -1
  80. sshler-1.3.0/sshler/static/dist/assets/mermaid.core-C2mTQdtl.js → sshler-1.3.1/sshler/static/dist/assets/mermaid.core-4ol_UC_A.js +4 -4
  81. sshler-1.3.0/sshler/static/dist/assets/mindmap-definition-I2QAS2VK-_q85r7dF.js → sshler-1.3.1/sshler/static/dist/assets/mindmap-definition-I2QAS2VK-BJRCcmyd.js +1 -1
  82. sshler-1.3.0/sshler/static/dist/assets/pegDiagram-FD4XPPHP-DDudVw-Y.js → sshler-1.3.1/sshler/static/dist/assets/pegDiagram-FD4XPPHP-CvZ_Wegk.js +1 -1
  83. sshler-1.3.0/sshler/static/dist/assets/pieDiagram-J4AKIIQI-BqvFr1aO.js → sshler-1.3.1/sshler/static/dist/assets/pieDiagram-J4AKIIQI--6t0D6Kz.js +1 -1
  84. sshler-1.3.0/sshler/static/dist/assets/quadrantDiagram-XTYBLID2-BoymLJsF.js → sshler-1.3.1/sshler/static/dist/assets/quadrantDiagram-XTYBLID2-CwPocKQT.js +1 -1
  85. sshler-1.3.0/sshler/static/dist/assets/railroadDiagram-MRQ6NCDL-DSoHEHCg.js → sshler-1.3.1/sshler/static/dist/assets/railroadDiagram-MRQ6NCDL-CSacJZiy.js +1 -1
  86. sshler-1.3.0/sshler/static/dist/assets/requirementDiagram-Y7LWUY3S-YZ16mKPo.js → sshler-1.3.1/sshler/static/dist/assets/requirementDiagram-Y7LWUY3S-Bp9sTYTi.js +1 -1
  87. sshler-1.3.0/sshler/static/dist/assets/sankeyDiagram-WGJFYUXA-CAxDBX7v.js → sshler-1.3.1/sshler/static/dist/assets/sankeyDiagram-WGJFYUXA-q9ffgr3H.js +1 -1
  88. sshler-1.3.0/sshler/static/dist/assets/sequenceDiagram-5NDRBG5M-CcwEdL0y.js → sshler-1.3.1/sshler/static/dist/assets/sequenceDiagram-5NDRBG5M-C3KrgMTi.js +1 -1
  89. sshler-1.3.0/sshler/static/dist/assets/sessionName-DUN8bJpk.js → sshler-1.3.1/sshler/static/dist/assets/sessionName-CkNEygtv.js +1 -1
  90. sshler-1.3.0/sshler/static/dist/assets/stateDiagram-v2-FJ4FJNEA-DCGJ2ioH.js → sshler-1.3.1/sshler/static/dist/assets/stateDiagram-v2-FJ4FJNEA-CZG2C6q3.js +1 -1
  91. sshler-1.3.0/sshler/static/dist/assets/swimlanes-UMQ2AFYF-D9gDCaI4.js → sshler-1.3.1/sshler/static/dist/assets/swimlanes-UMQ2AFYF-BTd3Xb9k.js +1 -1
  92. sshler-1.3.1/sshler/static/dist/assets/swimlanesDiagram-OMPLPG4O-Bt7AYwUB.js +8 -0
  93. sshler-1.3.0/sshler/static/dist/assets/timeline-definition-SEUHKTQE-DdmcvoJw.js → sshler-1.3.1/sshler/static/dist/assets/timeline-definition-SEUHKTQE-CdX5pcmY.js +1 -1
  94. sshler-1.3.0/sshler/static/dist/assets/useBoxAnswer-CZQidpPa.js → sshler-1.3.1/sshler/static/dist/assets/useBoxAnswer-B2esh4Oy.js +1 -1
  95. sshler-1.3.0/sshler/static/dist/assets/useFolderSearch-CJjr_Jqh.js → sshler-1.3.1/sshler/static/dist/assets/useFolderSearch-CWE9k81L.js +1 -1
  96. sshler-1.3.0/sshler/static/dist/assets/useReplacePrompt-YQcfeUCq.js → sshler-1.3.1/sshler/static/dist/assets/useReplacePrompt-DCG_eG_K.js +1 -1
  97. sshler-1.3.0/sshler/static/dist/assets/usecaseDiagram-AFA6YXN4-BCh0_dta.js → sshler-1.3.1/sshler/static/dist/assets/usecaseDiagram-AFA6YXN4-JC2hWcJp.js +1 -1
  98. sshler-1.3.0/sshler/static/dist/assets/vennDiagram-NNMJR3RB-HmLde3vs.js → sshler-1.3.1/sshler/static/dist/assets/vennDiagram-NNMJR3RB-BHJ1Ome8.js +1 -1
  99. sshler-1.3.0/sshler/static/dist/assets/wardleyDiagram-S7YFUSEH--TohOzHi.js → sshler-1.3.1/sshler/static/dist/assets/wardleyDiagram-S7YFUSEH-B8ajWmU2.js +1 -1
  100. sshler-1.3.0/sshler/static/dist/assets/xychartDiagram-GGNKY7IX-Cf76Eobh.js → sshler-1.3.1/sshler/static/dist/assets/xychartDiagram-GGNKY7IX-CK5-6aMZ.js +1 -1
  101. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/index.html +4 -4
  102. {sshler-1.3.0 → sshler-1.3.1}/sshler/validation.py +36 -0
  103. {sshler-1.3.0 → sshler-1.3.1}/sshler/webapp.py +4 -1
  104. {sshler-1.3.0 → sshler-1.3.1/sshler.egg-info}/PKG-INFO +1 -1
  105. {sshler-1.3.0 → sshler-1.3.1}/sshler.egg-info/SOURCES.txt +93 -88
  106. {sshler-1.3.0 → sshler-1.3.1}/tests/test_api_v1.py +25 -0
  107. {sshler-1.3.0 → sshler-1.3.1}/tests/test_box_files_contract.py +20 -5
  108. {sshler-1.3.0 → sshler-1.3.1}/tests/test_claude_sessions.py +40 -0
  109. {sshler-1.3.0 → sshler-1.3.1}/tests/test_existing_name_rule.py +13 -9
  110. {sshler-1.3.0 → sshler-1.3.1}/tests/test_files_folder_zip_remote.py +6 -1
  111. sshler-1.3.1/tests/test_home_guard.py +338 -0
  112. {sshler-1.3.0 → sshler-1.3.1}/tests/test_local_git_runs.py +26 -1
  113. sshler-1.3.1/tests/test_local_stats_thread.py +23 -0
  114. sshler-1.3.1/tests/test_login_lockout.py +74 -0
  115. {sshler-1.3.0 → sshler-1.3.1}/tests/test_path_validation.py +52 -0
  116. {sshler-1.3.0 → sshler-1.3.1}/tests/test_remote_tilde_routes.py +23 -4
  117. sshler-1.3.1/tests/test_snapshot_interval_wake.py +78 -0
  118. {sshler-1.3.0 → sshler-1.3.1}/tests/test_snapshot_loop_settings.py +3 -3
  119. {sshler-1.3.0 → sshler-1.3.1}/tests/test_ssh.py +3 -3
  120. sshler-1.3.0/sshler/static/dist/assets/ClaudeSessionsView-CFiCqe9_.css +0 -1
  121. sshler-1.3.0/sshler/static/dist/assets/ClaudeSessionsView-Dsr1b3SU.js +0 -137
  122. sshler-1.3.0/sshler/static/dist/assets/DiffView-QYPKtJgq.js +0 -9
  123. sshler-1.3.0/sshler/static/dist/assets/OverviewView-BYKkvHRn.css +0 -1
  124. sshler-1.3.0/sshler/static/dist/assets/OverviewView-DztAV6t8.js +0 -1
  125. sshler-1.3.0/sshler/static/dist/assets/flowDiagram-MALGAFMO-jiDO23TT.js +0 -1
  126. sshler-1.3.0/sshler/static/dist/assets/swimlanesDiagram-OMPLPG4O-CyX5GEB6.js +0 -8
  127. {sshler-1.3.0 → sshler-1.3.1}/LICENSE +0 -0
  128. {sshler-1.3.0 → sshler-1.3.1}/MANIFEST.in +0 -0
  129. {sshler-1.3.0 → sshler-1.3.1}/README.md +0 -0
  130. {sshler-1.3.0 → sshler-1.3.1}/scripts/capture_views.py +0 -0
  131. {sshler-1.3.0 → sshler-1.3.1}/scripts/check_frontend_dist.py +0 -0
  132. {sshler-1.3.0 → sshler-1.3.1}/setup.cfg +0 -0
  133. {sshler-1.3.0 → sshler-1.3.1}/sshler/__init__.py +0 -0
  134. {sshler-1.3.0 → sshler-1.3.1}/sshler/_pty_child.py +0 -0
  135. {sshler-1.3.0 → sshler-1.3.1}/sshler/access.py +0 -0
  136. {sshler-1.3.0 → sshler-1.3.1}/sshler/api/__init__.py +0 -0
  137. {sshler-1.3.0 → sshler-1.3.1}/sshler/api/archive.py +0 -0
  138. {sshler-1.3.0 → sshler-1.3.1}/sshler/api/artifacts.py +0 -0
  139. {sshler-1.3.0 → sshler-1.3.1}/sshler/api/auth.py +0 -0
  140. {sshler-1.3.0 → sshler-1.3.1}/sshler/api/batch.py +0 -0
  141. {sshler-1.3.0 → sshler-1.3.1}/sshler/api/box_files.py +0 -0
  142. {sshler-1.3.0 → sshler-1.3.1}/sshler/api/box_runner.py +0 -0
  143. {sshler-1.3.0 → sshler-1.3.1}/sshler/api/config.py +0 -0
  144. {sshler-1.3.0 → sshler-1.3.1}/sshler/api/dependencies.py +0 -0
  145. {sshler-1.3.0 → sshler-1.3.1}/sshler/api/diff.py +0 -0
  146. {sshler-1.3.0 → sshler-1.3.1}/sshler/api/excel.py +0 -0
  147. {sshler-1.3.0 → sshler-1.3.1}/sshler/api/failure.py +0 -0
  148. {sshler-1.3.0 → sshler-1.3.1}/sshler/api/git.py +0 -0
  149. {sshler-1.3.0 → sshler-1.3.1}/sshler/api/grep.py +0 -0
  150. {sshler-1.3.0 → sshler-1.3.1}/sshler/api/helpers.py +0 -0
  151. {sshler-1.3.0 → sshler-1.3.1}/sshler/api/models.py +0 -0
  152. {sshler-1.3.0 → sshler-1.3.1}/sshler/api/pdf.py +0 -0
  153. {sshler-1.3.0 → sshler-1.3.1}/sshler/api/ping.py +0 -0
  154. {sshler-1.3.0 → sshler-1.3.1}/sshler/api/placement.py +0 -0
  155. {sshler-1.3.0 → sshler-1.3.1}/sshler/api/progress.py +0 -0
  156. {sshler-1.3.0 → sshler-1.3.1}/sshler/api/rate_limiting.py +0 -0
  157. {sshler-1.3.0 → sshler-1.3.1}/sshler/api/run_failures.py +0 -0
  158. {sshler-1.3.0 → sshler-1.3.1}/sshler/api/search.py +0 -0
  159. {sshler-1.3.0 → sshler-1.3.1}/sshler/api/sessions.py +0 -0
  160. {sshler-1.3.0 → sshler-1.3.1}/sshler/api/snippets.py +0 -0
  161. {sshler-1.3.0 → sshler-1.3.1}/sshler/api/stats_stream.py +0 -0
  162. {sshler-1.3.0 → sshler-1.3.1}/sshler/api/terminal.py +0 -0
  163. {sshler-1.3.0 → sshler-1.3.1}/sshler/api/transfer.py +0 -0
  164. {sshler-1.3.0 → sshler-1.3.1}/sshler/api/tunnels.py +0 -0
  165. {sshler-1.3.0 → sshler-1.3.1}/sshler/artifacts.py +0 -0
  166. {sshler-1.3.0 → sshler-1.3.1}/sshler/auth.py +0 -0
  167. {sshler-1.3.0 → sshler-1.3.1}/sshler/claude_sessions.py +0 -0
  168. {sshler-1.3.0 → sshler-1.3.1}/sshler/cli/__init__.py +0 -0
  169. {sshler-1.3.0 → sshler-1.3.1}/sshler/cli/_main.py +0 -0
  170. {sshler-1.3.0 → sshler-1.3.1}/sshler/cli/artifacts.py +0 -0
  171. {sshler-1.3.0 → sshler-1.3.1}/sshler/cli/client.py +0 -0
  172. {sshler-1.3.0 → sshler-1.3.1}/sshler/cli/password.py +0 -0
  173. {sshler-1.3.0 → sshler-1.3.1}/sshler/cli/ping.py +0 -0
  174. {sshler-1.3.0 → sshler-1.3.1}/sshler/cli/progress.py +0 -0
  175. {sshler-1.3.0 → sshler-1.3.1}/sshler/cli/runtime_token.py +0 -0
  176. {sshler-1.3.0 → sshler-1.3.1}/sshler/cli/server.py +0 -0
  177. {sshler-1.3.0 → sshler-1.3.1}/sshler/config.py +0 -0
  178. {sshler-1.3.0 → sshler-1.3.1}/sshler/config_cache.py +0 -0
  179. {sshler-1.3.0 → sshler-1.3.1}/sshler/config_dir.py +0 -0
  180. {sshler-1.3.0 → sshler-1.3.1}/sshler/pdf.py +0 -0
  181. {sshler-1.3.0 → sshler-1.3.1}/sshler/proc.py +0 -0
  182. {sshler-1.3.0 → sshler-1.3.1}/sshler/ptyspawn.py +0 -0
  183. {sshler-1.3.0 → sshler-1.3.1}/sshler/rate_limit.py +0 -0
  184. {sshler-1.3.0 → sshler-1.3.1}/sshler/scripts/install-sshler-task.ps1 +0 -0
  185. {sshler-1.3.0 → sshler-1.3.1}/sshler/scripts/remove-sshler-task.ps1 +0 -0
  186. {sshler-1.3.0 → sshler-1.3.1}/sshler/scripts/run-sshler.ps1 +0 -0
  187. {sshler-1.3.0 → sshler-1.3.1}/sshler/session.py +0 -0
  188. {sshler-1.3.0 → sshler-1.3.1}/sshler/session_activity.py +0 -0
  189. {sshler-1.3.0 → sshler-1.3.1}/sshler/settings.py +0 -0
  190. {sshler-1.3.0 → sshler-1.3.1}/sshler/spa.py +0 -0
  191. {sshler-1.3.0 → sshler-1.3.1}/sshler/ssh.py +0 -0
  192. {sshler-1.3.0 → sshler-1.3.1}/sshler/ssh_config.py +0 -0
  193. {sshler-1.3.0 → sshler-1.3.1}/sshler/ssh_pool.py +0 -0
  194. {sshler-1.3.0 → sshler-1.3.1}/sshler/state.py +0 -0
  195. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/Add-DEmZuhBN.js +0 -0
  196. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/ArtifactsView-WEoMOwvv.css +0 -0
  197. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/BoxesView-Kv_-7He8.css +0 -0
  198. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/ChevronRight-BRxEsqaL.js +0 -0
  199. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/CommanderView-C3kzrrRj.css +0 -0
  200. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/ContextMenu-Dzb8gEM5.css +0 -0
  201. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/DiffViewer-BRAHvu6K.css +0 -0
  202. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/DiffViewer-CwS6Pb5U.js +0 -0
  203. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/DirectoryPickerModal-s0UA0vR3.css +0 -0
  204. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/GitBadge-i4R5k8Yn.css +0 -0
  205. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/Input-DnapVD4O.js +0 -0
  206. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/LoginView-BVD5vU89.css +0 -0
  207. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/MultiTerminalView-DK69qR-F.css +0 -0
  208. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/NotFoundView-D_bm6QDQ.css +0 -0
  209. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/NotFoundView-Dj55XWwy.js +0 -0
  210. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/PhArrowLeft.vue-BMs1SZjy.js +0 -0
  211. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/PhArrowsClockwise.vue-9RBDD46V.js +0 -0
  212. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/PhArrowsLeftRight.vue-DjncoiiD.js +0 -0
  213. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/PhArrowsOut.vue-BOCyKglI.js +0 -0
  214. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/PhCheck.vue-DVhfUCos.js +0 -0
  215. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/PhCircle.vue-BMTIJDex.js +0 -0
  216. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/PhClockCounterClockwise.vue-eSgjR-is.js +0 -0
  217. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/PhCopy.vue-FKiTGwf5.js +0 -0
  218. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/PhCopySimple.vue-lAo26JOS.js +0 -0
  219. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/PhFloppyDisk.vue-DG1DzU7a.js +0 -0
  220. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/PhFolderOpen.vue-DXTvd5o3.js +0 -0
  221. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/PhGitBranch.vue-B09vnVPP.js +0 -0
  222. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/PhPencilSimple.vue-DEromwmD.js +0 -0
  223. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/PhPlay.vue-D_wZ8r3z.js +0 -0
  224. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/PhPushPinSimple.vue-BMQpg4HB.js +0 -0
  225. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/PhQuestion.vue-6r8_Wp_x.js +0 -0
  226. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/PhTrash.vue-B_MgjXry.js +0 -0
  227. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/Popover-B7DitKyC.js +0 -0
  228. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/ProgressView-3p_OIi-y.css +0 -0
  229. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/Select-Cc7bvkLZ.js +0 -0
  230. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/SettingsView-quFzRgtz.css +0 -0
  231. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/Spin-Dd0ayTqa.js +0 -0
  232. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/Suffix-B36DzEY5.js +0 -0
  233. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/Tag-DuIn8UVX.js +0 -0
  234. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/TerminalView-B9PJBhCP.css +0 -0
  235. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/Warning-DdY8ttUA.js +0 -0
  236. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/_baseEach-DRxRab5x.js +0 -0
  237. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/_plugin-vue_export-helper-Bq7SfXed.js +0 -0
  238. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/architecture-WOLXFQ4H-C6rElQ7Y.js +0 -0
  239. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/bpmnIcons-APHXDYXF-C0jbCElo.js +0 -0
  240. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/chunk-2Q5K7J3B-C1jixKkw.js +0 -0
  241. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/chunk-5VM5RSS4-ZNzvKenW.js +0 -0
  242. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/chunk-DUW6YSOI-Dgx8z5s3.js +0 -0
  243. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/chunk-J5ZVWO5B-oDCd-gWO.js +0 -0
  244. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/chunk-JWPE2WC7-DVXcaiue.js +0 -0
  245. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/chunk-NGNAAXSQ-DI_UYJZ4.js +0 -0
  246. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/chunk-XXDRQBXY-i7MKP1NY.js +0 -0
  247. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +0 -0
  248. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/composables-t62CRov_.js +0 -0
  249. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/cose-bilkent-JH36ORCC-C6J2IoHg.js +0 -0
  250. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/cynefin-EF2NZ3EQ-lPUjyvIZ.js +0 -0
  251. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/cytoscape.esm-nTrd5EVq.js +0 -0
  252. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/d3-scale-CElPUUud.js +0 -0
  253. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/d3-selection-COWvaQNI.js +0 -0
  254. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/dist-DdXDFcej.js +0 -0
  255. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/event-Db0nAmVz.js +0 -0
  256. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/eventmodeling-K75KTNOO-BEvQBdS3.js +0 -0
  257. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/flatten-C237jh8P.js +0 -0
  258. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/get-Jkx-poUl.js +0 -0
  259. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/get-slot-6kXJmSMP.js +0 -0
  260. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/gitGraph-VSP46ZUC-DPePhKd7.js +0 -0
  261. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/graphlib-C-M0B7mD.js +0 -0
  262. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/happens-in-D4nrdV77.js +0 -0
  263. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/i18n-gQdbl5sJ.js +0 -0
  264. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/info-OHQRW6UA-FXs-3RzV.js +0 -0
  265. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/isArrayLikeObject-DDw98r_w.js +0 -0
  266. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/katex-MEuSR36T.js +0 -0
  267. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/light-B3Z7NuY-.js +0 -0
  268. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/light-Bw_xNwn4.js +0 -0
  269. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/light-COnbaPWa.js +0 -0
  270. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/map-qc1plvxH.js +0 -0
  271. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/merge-DVfkhdQt.js +0 -0
  272. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/mermaid-parser.core-gWF4TbpQ.js +0 -0
  273. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/packet-JDAUHWVQ-DWI00mii.js +0 -0
  274. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/pageLoad-86LfyLdt.js +0 -0
  275. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/pathParts-B6X81jnP.js +0 -0
  276. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/pie-XZMESJXO-mEep_piW.js +0 -0
  277. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/preload-helper-BSZHtiEo.js +0 -0
  278. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/radar-ABXABTNO-Co9rsjbw.js +0 -0
  279. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/railroad-I3PHUGI6-_QD7qyEP.js +0 -0
  280. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/railroad-abnf-LNEFI6M7-Dya2h1Ax.js +0 -0
  281. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/railroad-ebnf-DWYD2UWJ-xXJLDf9V.js +0 -0
  282. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/railroad-peg-JR7BVNR7-CCnFE6SM.js +0 -0
  283. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/rolldown-runtime-COiEfhsA.js +0 -0
  284. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/rough.esm-Dy-Kn_BL.js +0 -0
  285. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/runtime-core.esm-bundler-Dg-ZVrJt.js +0 -0
  286. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/sizeCapture-INFHLROL-3uHXrFqA.js +0 -0
  287. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/treeView-D4JQ5SDB-v1jaVIUB.js +0 -0
  288. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/treemap-SAJKECNS-DNI-q7O8.js +0 -0
  289. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/use-merged-state-Dm-xuTAu.js +0 -0
  290. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/useApi-SF8tY_yo-CGxurG4J.js +0 -0
  291. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/useReplacePrompt-g2-2SknS.css +0 -0
  292. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/assets/wardley-7MLQ67FV-B8BqdR-s.js +0 -0
  293. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/favicon.png +0 -0
  294. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/fonts/MonaspaceNeon-Bold.woff2 +0 -0
  295. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/fonts/MonaspaceNeon-Regular.woff2 +0 -0
  296. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/fonts/MonaspaceNeon-Variable.woff2 +0 -0
  297. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/icon-192.png +0 -0
  298. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/icon-512-maskable.png +0 -0
  299. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/icon-512.png +0 -0
  300. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/logo.png +0 -0
  301. {sshler-1.3.0 → sshler-1.3.1}/sshler/static/dist/manifest.webmanifest +0 -0
  302. {sshler-1.3.0 → sshler-1.3.1}/sshler/terminal/__init__.py +0 -0
  303. {sshler-1.3.0 → sshler-1.3.1}/sshler/terminal/conpty.py +0 -0
  304. {sshler-1.3.0 → sshler-1.3.1}/sshler/terminal/local.py +0 -0
  305. {sshler-1.3.0 → sshler-1.3.1}/sshler/terminal/pump.py +0 -0
  306. {sshler-1.3.0 → sshler-1.3.1}/sshler/terminal/remote.py +0 -0
  307. {sshler-1.3.0 → sshler-1.3.1}/sshler/terminal/transport.py +0 -0
  308. {sshler-1.3.0 → sshler-1.3.1}/sshler/tmux.py +0 -0
  309. {sshler-1.3.0 → sshler-1.3.1}/sshler/win_terminal_registry.py +0 -0
  310. {sshler-1.3.0 → sshler-1.3.1}/sshler/winpty_proc.py +0 -0
  311. {sshler-1.3.0 → sshler-1.3.1}/sshler.egg-info/dependency_links.txt +0 -0
  312. {sshler-1.3.0 → sshler-1.3.1}/sshler.egg-info/entry_points.txt +0 -0
  313. {sshler-1.3.0 → sshler-1.3.1}/sshler.egg-info/requires.txt +0 -0
  314. {sshler-1.3.0 → sshler-1.3.1}/sshler.egg-info/top_level.txt +0 -0
  315. {sshler-1.3.0 → sshler-1.3.1}/tests/test_api_artifacts.py +0 -0
  316. {sshler-1.3.0 → sshler-1.3.1}/tests/test_api_body_models.py +0 -0
  317. {sshler-1.3.0 → sshler-1.3.1}/tests/test_api_diff.py +0 -0
  318. {sshler-1.3.0 → sshler-1.3.1}/tests/test_api_progress.py +0 -0
  319. {sshler-1.3.0 → sshler-1.3.1}/tests/test_archive.py +0 -0
  320. {sshler-1.3.0 → sshler-1.3.1}/tests/test_archive_existing_names.py +0 -0
  321. {sshler-1.3.0 → sshler-1.3.1}/tests/test_artifacts.py +0 -0
  322. {sshler-1.3.0 → sshler-1.3.1}/tests/test_basic.py +0 -0
  323. {sshler-1.3.0 → sshler-1.3.1}/tests/test_batch_ops.py +0 -0
  324. {sshler-1.3.0 → sshler-1.3.1}/tests/test_box_program_failure_reasons.py +0 -0
  325. {sshler-1.3.0 → sshler-1.3.1}/tests/test_box_runner_contract.py +0 -0
  326. {sshler-1.3.0 → sshler-1.3.1}/tests/test_cli_artifacts.py +0 -0
  327. {sshler-1.3.0 → sshler-1.3.1}/tests/test_cli_imports.py +0 -0
  328. {sshler-1.3.0 → sshler-1.3.1}/tests/test_cli_progress.py +0 -0
  329. {sshler-1.3.0 → sshler-1.3.1}/tests/test_cli_stop.py +0 -0
  330. {sshler-1.3.0 → sshler-1.3.1}/tests/test_client_address.py +0 -0
  331. {sshler-1.3.0 → sshler-1.3.1}/tests/test_command_injection.py +0 -0
  332. {sshler-1.3.0 → sshler-1.3.1}/tests/test_config.py +0 -0
  333. {sshler-1.3.0 → sshler-1.3.1}/tests/test_database_indexes.py +0 -0
  334. {sshler-1.3.0 → sshler-1.3.1}/tests/test_dev_workflow.py +0 -0
  335. {sshler-1.3.0 → sshler-1.3.1}/tests/test_failure_answers.py +0 -0
  336. {sshler-1.3.0 → sshler-1.3.1}/tests/test_failure_reasons.py +0 -0
  337. {sshler-1.3.0 → sshler-1.3.1}/tests/test_fake_tmux.py +0 -0
  338. {sshler-1.3.0 → sshler-1.3.1}/tests/test_files_upload_local.py +0 -0
  339. {sshler-1.3.0 → sshler-1.3.1}/tests/test_force_kill.py +0 -0
  340. {sshler-1.3.0 → sshler-1.3.1}/tests/test_git_refs.py +0 -0
  341. {sshler-1.3.0 → sshler-1.3.1}/tests/test_grep.py +0 -0
  342. {sshler-1.3.0 → sshler-1.3.1}/tests/test_handshake_status.py +0 -0
  343. {sshler-1.3.0 → sshler-1.3.1}/tests/test_httpx_ws.py +0 -0
  344. {sshler-1.3.0 → sshler-1.3.1}/tests/test_keep_both.py +0 -0
  345. {sshler-1.3.0 → sshler-1.3.1}/tests/test_local_folder_copy.py +0 -0
  346. {sshler-1.3.0 → sshler-1.3.1}/tests/test_origin_csrf.py +0 -0
  347. {sshler-1.3.0 → sshler-1.3.1}/tests/test_page_failure_reasons.py +0 -0
  348. {sshler-1.3.0 → sshler-1.3.1}/tests/test_ping_websocket.py +0 -0
  349. {sshler-1.3.0 → sshler-1.3.1}/tests/test_plain_shell.py +0 -0
  350. {sshler-1.3.0 → sshler-1.3.1}/tests/test_platform_support.py +0 -0
  351. {sshler-1.3.0 → sshler-1.3.1}/tests/test_progress_websocket.py +0 -0
  352. {sshler-1.3.0 → sshler-1.3.1}/tests/test_ptyspawn.py +0 -0
  353. {sshler-1.3.0 → sshler-1.3.1}/tests/test_rate_limit.py +0 -0
  354. {sshler-1.3.0 → sshler-1.3.1}/tests/test_rate_limit_middleware.py +0 -0
  355. {sshler-1.3.0 → sshler-1.3.1}/tests/test_recovery.py +0 -0
  356. {sshler-1.3.0 → sshler-1.3.1}/tests/test_remote_git_info_quoting.py +0 -0
  357. {sshler-1.3.0 → sshler-1.3.1}/tests/test_remote_home_callers.py +0 -0
  358. {sshler-1.3.0 → sshler-1.3.1}/tests/test_remote_owners.py +0 -0
  359. {sshler-1.3.0 → sshler-1.3.1}/tests/test_remote_program_checks.py +0 -0
  360. {sshler-1.3.0 → sshler-1.3.1}/tests/test_require_token.py +0 -0
  361. {sshler-1.3.0 → sshler-1.3.1}/tests/test_route_failure_reasons.py +0 -0
  362. {sshler-1.3.0 → sshler-1.3.1}/tests/test_search.py +0 -0
  363. {sshler-1.3.0 → sshler-1.3.1}/tests/test_serve_token_cache.py +0 -0
  364. {sshler-1.3.0 → sshler-1.3.1}/tests/test_session_active_flag.py +0 -0
  365. {sshler-1.3.0 → sshler-1.3.1}/tests/test_session_auth.py +0 -0
  366. {sshler-1.3.0 → sshler-1.3.1}/tests/test_session_name_parity.py +0 -0
  367. {sshler-1.3.0 → sshler-1.3.1}/tests/test_snippets.py +0 -0
  368. {sshler-1.3.0 → sshler-1.3.1}/tests/test_ssh_connection_leaks.py +0 -0
  369. {sshler-1.3.0 → sshler-1.3.1}/tests/test_ssh_loopback.py +0 -0
  370. {sshler-1.3.0 → sshler-1.3.1}/tests/test_ssh_pool_age.py +0 -0
  371. {sshler-1.3.0 → sshler-1.3.1}/tests/test_state_store.py +0 -0
  372. {sshler-1.3.0 → sshler-1.3.1}/tests/test_stats_stream.py +0 -0
  373. {sshler-1.3.0 → sshler-1.3.1}/tests/test_terminal_closes.py +0 -0
  374. {sshler-1.3.0 → sshler-1.3.1}/tests/test_terminal_endings.py +0 -0
  375. {sshler-1.3.0 → sshler-1.3.1}/tests/test_terminal_teardown.py +0 -0
  376. {sshler-1.3.0 → sshler-1.3.1}/tests/test_terminal_transport_contract.py +0 -0
  377. {sshler-1.3.0 → sshler-1.3.1}/tests/test_tmux_subprocess.py +0 -0
  378. {sshler-1.3.0 → sshler-1.3.1}/tests/test_tmux_window_list.py +0 -0
  379. {sshler-1.3.0 → sshler-1.3.1}/tests/test_tunnels.py +0 -0
  380. {sshler-1.3.0 → sshler-1.3.1}/tests/test_websocket.py +0 -0
  381. {sshler-1.3.0 → sshler-1.3.1}/tests/test_win_terminal_registry.py +0 -0
  382. {sshler-1.3.0 → sshler-1.3.1}/tests/test_windows_terminal.py +0 -0
  383. {sshler-1.3.0 → sshler-1.3.1}/tests/test_ws_access.py +0 -0
  384. {sshler-1.3.0 → sshler-1.3.1}/tests/test_ws_term_auth.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sshler
3
- Version: 1.3.0
3
+ Version: 1.3.1
4
4
  Summary: A local FastAPI-powered SSH multiplexer for tmux-in-browser — from your laptop only.
5
5
  Author-email: Gabu <gabu@gabu.quest>
6
6
  License-Expression: MIT
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
 
6
6
  [project]
7
7
  name = "sshler"
8
- version = "1.3.0"
8
+ version = "1.3.1"
9
9
  description = "A local FastAPI-powered SSH multiplexer for tmux-in-browser — from your laptop only."
10
10
  readme = "README.md"
11
11
  requires-python = ">=3.12"
@@ -148,9 +148,11 @@ def get_router(deps: APIDependencies) -> APIRouter:
148
148
  application_config: AppConfig = Depends(deps.get_application_config),
149
149
  ) -> APIRefreshResult:
150
150
  """Remove connection overrides so SSH config values apply."""
151
- deps.get_box_or_404(application_config, name)
151
+ box = deps.get_box_or_404(application_config, name)
152
152
  stored_override = application_config.stored.get(name)
153
- if stored_override is not None:
153
+ # A box defined only in boxes.yaml has no SSH config to fall back to: its
154
+ # stored entry is the box itself, so a refresh must leave it alone.
155
+ if stored_override is not None and box.source != "custom":
154
156
  stored_override.host = None
155
157
  stored_override.user = None
156
158
  stored_override.port = None
@@ -244,8 +246,8 @@ async def _get_local_stats(name: str) -> APIBoxStats:
244
246
 
245
247
  import psutil
246
248
 
247
- # CPU usage (average over 0.1 second)
248
- cpu_percent = psutil.cpu_percent(interval=0.1)
249
+ # CPU usage (average over 0.1 second), sampled off the event loop
250
+ cpu_percent = await asyncio.to_thread(psutil.cpu_percent, 0.1)
249
251
 
250
252
  # Memory info
251
253
  mem = psutil.virtual_memory()
@@ -32,7 +32,7 @@ from ..tmux import (
32
32
  ts_session_name,
33
33
  )
34
34
  from .dependencies import APIDependencies
35
- from .failure import REASON_INVALID, REASON_NOT_FOUND, Failure
35
+ from .failure import REASON_INVALID, REASON_NOT_FOUND, REASON_UNREACHABLE, Failure
36
36
  from .models import APIClaudeOpenRequest, APIClaudeOpenResult, APIClaudeSession
37
37
 
38
38
  logger = logging.getLogger(__name__)
@@ -132,7 +132,12 @@ def get_router(deps: APIDependencies) -> APIRouter:
132
132
  target = f"{session}:{window}"
133
133
 
134
134
  # Ensure the repo-root session exists.
135
- if session not in (await discover_local_sessions()).names:
135
+ live = await discover_local_sessions()
136
+ if session not in live.names:
137
+ if not live.complete:
138
+ # A server could not be asked: the session may run there, and
139
+ # `new-session` would start a second one.
140
+ raise Failure(REASON_UNREACHABLE, "Could not list local tmux sessions")
136
141
  await _run_local_tmux_command(
137
142
  session, ["new-session", "-d", "-s", session, "-c", session_dir]
138
143
  )
@@ -291,8 +291,10 @@ class BoxFiles(Protocol):
291
291
  (``ensure_source_unchanged``, which names ``target``); otherwise keep it."""
292
292
  ...
293
293
 
294
- async def delete(self, path: str) -> None:
295
- """Delete one file."""
294
+ async def delete(self, path: str) -> str:
295
+ """Delete one file, given as the client sent it; a link is removed, never what it
296
+ points to, and the home folder or a folder above it is refused. Returns the path
297
+ removed."""
296
298
  ...
297
299
 
298
300
  async def chmod(self, path: str, mode: int) -> None: ...
@@ -130,8 +130,7 @@ def get_router(deps: APIDependencies) -> APIRouter:
130
130
  ) -> APISimpleMessage:
131
131
  box = deps.get_box_or_404(application_config, name)
132
132
  async with box_files(deps, box, application_config, _FILE) as files:
133
- target = await files.path(payload.path)
134
- await files.delete(target)
133
+ target = await files.delete(payload.path)
135
134
  return APISimpleMessage(status="ok", message="deleted", path=target)
136
135
 
137
136
  @router.post("/boxes/{name}/move", response_model=APISimpleMessage)
@@ -695,7 +695,9 @@ async def _local_read_bytes(path: str, limit: int) -> tuple[bytes, bool]:
695
695
  async def _local_batch_delete(path: str) -> None:
696
696
  def _worker() -> None:
697
697
  target = Path(path)
698
- if target.is_dir():
698
+ if target.is_symlink() or target.is_junction():
699
+ target.unlink() # the link itself, never what it points to
700
+ elif target.is_dir():
699
701
  shutil.rmtree(target)
700
702
  else:
701
703
  target.unlink()
@@ -713,22 +715,50 @@ async def _local_delete_file(path: str) -> None:
713
715
  # The gitignore marks of a listing are a nicety: a git that does not answer in
714
716
  # this time is given up on and the listing goes out without them.
715
717
  GITIGNORE_TIMEOUT = 5.0
718
+ # Finding the folders that ignore all they hold walks the folder's tree as `git status`
719
+ # does; a tree too big for this time keeps only the marks of the first check.
720
+ WHOLLY_IGNORED_TIMEOUT = 2.0
716
721
 
717
722
 
718
723
  async def _get_gitignored_names(directory: str, names: list[str]) -> set[str]:
719
- """Check which filenames in a directory are gitignored. Returns set of ignored names."""
724
+ """The names in *directory* that `git status --ignored` lists as ignored.
725
+
726
+ `check-ignore` marks the names a rule matches. A folder that ignores its own contents
727
+ with a `.gitignore` of `*` (.mypy_cache, .pytest_cache, a uv .venv) is matched by no
728
+ rule, so `ls-files` adds the folders git reports as wholly ignored (`name/`).
729
+ """
720
730
  try:
721
731
  returncode, stdout, _ = await run_bounded(
722
- ["git", "check-ignore", "--stdin"],
732
+ # -z: names in and out as they are; without it git prints a name with
733
+ # non-ASCII characters (日本.log) quoted and escaped, and it never matches.
734
+ ["git", "check-ignore", "--stdin", "-z"],
723
735
  GITIGNORE_TIMEOUT,
724
736
  cwd=directory,
725
- stdin_data="\n".join(names).encode(),
737
+ stdin_data="\0".join(names).encode(),
726
738
  )
727
739
  if returncode not in (0, 1): # 1 means none matched, 128 means not a git repo
728
740
  return set()
729
- return set(line.strip() for line in stdout.decode().splitlines() if line.strip())
741
+ ignored = {name for name in stdout.decode(errors="replace").split("\0") if name}
730
742
  except Exception:
731
743
  return set()
744
+ if ignored.issuperset(names):
745
+ return ignored
746
+ try:
747
+ returncode, stdout, _ = await run_bounded(
748
+ ["git", "ls-files", "-z", "--others", "--ignored", "--exclude-standard", "--directory"],
749
+ WHOLLY_IGNORED_TIMEOUT,
750
+ cwd=directory,
751
+ )
752
+ except Exception:
753
+ return ignored
754
+ if returncode != 0:
755
+ return ignored
756
+ wanted = set(names)
757
+ for path in stdout.decode(errors="replace").split("\0"):
758
+ name, slash, rest = path.partition("/")
759
+ if slash and not rest and name in wanted:
760
+ ignored.add(name)
761
+ return ignored
732
762
 
733
763
 
734
764
  def _safe_extract_zip(zf: zipfile.ZipFile, dest_dir: Path) -> None:
@@ -1023,6 +1053,37 @@ def _local_path(path: str) -> str:
1023
1053
  return _normalize_local_path(path)
1024
1054
 
1025
1055
 
1056
+ def _local_link_itself(sent: str, resolved: str) -> str:
1057
+ """The link ``sent`` names when its last part is a link (worker thread), else
1058
+ ``resolved``. ``_local_path`` follows every link, so a delete or a move of a link
1059
+ would act on what it points to; the link's folder is resolved, its name is not."""
1060
+ try:
1061
+ base = os.path.abspath(os.path.expanduser(sent))
1062
+ name = os.path.basename(base)
1063
+ if name not in ("", ".", ".."):
1064
+ candidate = os.path.join(os.path.realpath(os.path.dirname(base)), name)
1065
+ # A Windows directory junction links a folder as a symlink does, but
1066
+ # `islink` says False for it.
1067
+ if os.path.islink(candidate) or os.path.isjunction(candidate):
1068
+ return local_path_form(candidate)
1069
+ except (OSError, ValueError):
1070
+ pass
1071
+ return resolved
1072
+
1073
+
1074
+ def _local_refuse_home_or_above(resolved: Sequence[str]) -> None:
1075
+ """Refuse the whole batch when one path is the home folder or above it."""
1076
+ try:
1077
+ home = local_path_form(Path.home().resolve())
1078
+ except (OSError, RuntimeError):
1079
+ return
1080
+ for path in resolved:
1081
+ try:
1082
+ PathValidator.refuse_home_or_ancestor(path, home, windows=LOCAL_IS_WINDOWS)
1083
+ except ValidationError as exc:
1084
+ raise Failure(REASON_INVALID, str(exc)) from exc
1085
+
1086
+
1026
1087
  def _local_folder_size(base: Path) -> int:
1027
1088
  """The bytes of the files under ``base`` (worker thread). A missing or unreadable
1028
1089
  ``base`` fails as the system says; an unreadable entry under it is left out."""
@@ -1068,6 +1129,16 @@ class LocalFiles:
1068
1129
  def _resolve(self, path: str) -> str:
1069
1130
  return self._spelled.note(_local_path(path), path)
1070
1131
 
1132
+ def _refuse_home_in(self, paths: Sequence[str]) -> None:
1133
+ """Worker thread: a path that cannot be resolved fails on its own later."""
1134
+ resolved: list[str] = []
1135
+ for path in paths:
1136
+ try:
1137
+ resolved.append(self._resolve(path))
1138
+ except Exception:
1139
+ continue
1140
+ _local_refuse_home_or_above(resolved)
1141
+
1071
1142
  # --- paths -----------------------------------------------------------------------
1072
1143
 
1073
1144
  async def path(self, path: str) -> str:
@@ -1249,8 +1320,15 @@ class LocalFiles:
1249
1320
 
1250
1321
  await asyncio.to_thread(_check_and_remove)
1251
1322
 
1252
- async def delete(self, path: str) -> None:
1253
- await _local_delete_file(path)
1323
+ async def delete(self, path: str) -> str:
1324
+ def _target() -> str:
1325
+ resolved = self._resolve(path)
1326
+ _local_refuse_home_or_above([resolved])
1327
+ return _local_link_itself(path, resolved)
1328
+
1329
+ target = await asyncio.to_thread(_target)
1330
+ await _local_delete_file(target)
1331
+ return target
1254
1332
 
1255
1333
  async def chmod(self, path: str, mode: int) -> None:
1256
1334
  await asyncio.to_thread(Path(path).chmod, mode)
@@ -1261,7 +1339,9 @@ class LocalFiles:
1261
1339
  new_name = PathValidator.validate_filename(new_name)
1262
1340
 
1263
1341
  def _rename() -> str:
1264
- source = Path(self._resolve(path))
1342
+ resolved = self._resolve(path)
1343
+ _local_refuse_home_or_above([resolved])
1344
+ source = Path(_local_link_itself(path, resolved))
1265
1345
  target = str(source.parent / new_name)
1266
1346
  landed = _local_place(
1267
1347
  str(source), target, move=True, overwrite=overwrite, keep_both=keep_both
@@ -1284,6 +1364,9 @@ class LocalFiles:
1284
1364
  if new_name:
1285
1365
  PathValidator.validate_filename(new_name)
1286
1366
  resolved = await asyncio.to_thread(self._resolve, source)
1367
+ if move:
1368
+ await asyncio.to_thread(_local_refuse_home_or_above, [resolved])
1369
+ resolved = await asyncio.to_thread(_local_link_itself, source, resolved)
1287
1370
  dest_dir = Path(await asyncio.to_thread(self._resolve, destination))
1288
1371
  landed = await asyncio.to_thread(
1289
1372
  _local_place_into,
@@ -1343,9 +1426,11 @@ class LocalFiles:
1343
1426
 
1344
1427
  async def delete_many(self, paths: Sequence[str]) -> BatchOutcome:
1345
1428
  outcome = BatchOutcome()
1429
+ await asyncio.to_thread(self._refuse_home_in, paths)
1346
1430
  for path in paths:
1347
1431
  try:
1348
1432
  normalized = await asyncio.to_thread(self._resolve, path)
1433
+ normalized = await asyncio.to_thread(_local_link_itself, path, normalized)
1349
1434
  await _local_batch_delete(normalized)
1350
1435
  outcome.succeeded.append(path)
1351
1436
  except Exception as exc:
@@ -1366,9 +1451,13 @@ class LocalFiles:
1366
1451
  outcome = BatchOutcome()
1367
1452
  landed: set[str] = set()
1368
1453
  dest_dir = Path(await asyncio.to_thread(self._resolve, destination))
1454
+ if move:
1455
+ await asyncio.to_thread(self._refuse_home_in, paths)
1369
1456
  for path in paths:
1370
1457
  try:
1371
1458
  source = await asyncio.to_thread(self._resolve, path)
1459
+ if move:
1460
+ source = await asyncio.to_thread(_local_link_itself, path, source)
1372
1461
  target, at = await asyncio.to_thread(
1373
1462
  partial(
1374
1463
  _local_batch_item,
@@ -13,6 +13,7 @@ from ..session_activity import match_tmux
13
13
  from ..snapshot import (
14
14
  get_last_snapshot_at,
15
15
  get_recovery_sessions,
16
+ notify_interval_changed,
16
17
  recreate_session,
17
18
  remove_recovery_session,
18
19
  saved_layout,
@@ -197,6 +198,7 @@ def get_router(deps: APIDependencies) -> APIRouter:
197
198
  deps.settings.snapshot_enabled = update.enabled
198
199
  if update.interval is not None:
199
200
  deps.settings.snapshot_interval = max(5, min(300, update.interval))
201
+ notify_interval_changed()
200
202
  return APISnapshotConfig(
201
203
  enabled=deps.settings.snapshot_enabled,
202
204
  interval=deps.settings.snapshot_interval,
@@ -20,6 +20,8 @@ import shlex
20
20
  import weakref
21
21
  from pathlib import PurePosixPath
22
22
 
23
+ import asyncssh
24
+
23
25
  from ..validation import PathValidator, ValidationError
24
26
  from .failure import REASON_INVALID, REASON_UNREACHABLE, Failure
25
27
 
@@ -60,6 +62,29 @@ async def remote_home(connection) -> str:
60
62
  return home
61
63
 
62
64
 
65
+ # The server's real path of each live connection's home folder, for the home guard.
66
+ _real_homes: weakref.WeakKeyDictionary[object, str] = weakref.WeakKeyDictionary()
67
+
68
+
69
+ async def remote_real_home(connection, sftp_client) -> str | None:
70
+ """The real path of the home folder (a link along it followed), asked once per
71
+ connection; None when the server cannot say."""
72
+ try:
73
+ return _real_homes[connection]
74
+ except (KeyError, TypeError):
75
+ pass
76
+ home = await remote_home(connection)
77
+ try:
78
+ real = str(await sftp_client.realpath(home))
79
+ except asyncssh.SFTPError:
80
+ return None
81
+ try:
82
+ _real_homes[connection] = real
83
+ except TypeError:
84
+ pass
85
+ return real
86
+
87
+
63
88
  async def resolve_tilde(connection, path: str) -> str:
64
89
  """``path`` with a leading ``~`` or ``~/`` replaced by the remote home, normalised.
65
90
 
@@ -78,7 +78,9 @@ from .remote import (
78
78
  in_directory,
79
79
  path_word,
80
80
  remote_directory,
81
+ remote_home,
81
82
  remote_path,
83
+ remote_real_home,
82
84
  )
83
85
 
84
86
  logger = logging.getLogger(__name__)
@@ -486,6 +488,27 @@ async def _remote_own_name_by_case(sftp_client, source: str, target: str) -> boo
486
488
  return target_name not in names
487
489
 
488
490
 
491
+ async def _remote_refuse_home_or_above(connection, sftp_client, paths: Sequence[str]) -> None:
492
+ """Refuse the whole batch (400, nothing touched) when a resolved path is the home
493
+ folder or above it, or is a link to either. Both the paths and the home are
494
+ compared as spelled and as the server's real path, so a link anywhere along
495
+ either (`/home -> /export/home`, `/srv/h -> /home`) cannot hide the home."""
496
+ homes = [await remote_home(connection)]
497
+ real_home = await remote_real_home(connection, sftp_client)
498
+ if real_home is not None and real_home not in homes:
499
+ homes.append(real_home)
500
+ for path in paths:
501
+ names = [path]
502
+ with contextlib.suppress(asyncssh.SFTPError): # a missing path fails on its own later
503
+ names.append(str(await sftp_client.realpath(path)))
504
+ for name in names:
505
+ for base in homes:
506
+ try:
507
+ PathValidator.refuse_home_or_ancestor(name, base)
508
+ except ValidationError as exc:
509
+ raise Failure(REASON_INVALID, str(exc)) from exc
510
+
511
+
489
512
  async def _remote_realpath_of_missing(sftp_client, folder: str) -> str:
490
513
  """The real path of ``folder``, which may not exist yet: that of its nearest folder
491
514
  that does, with the missing names after it."""
@@ -1201,10 +1224,15 @@ class RemoteFiles:
1201
1224
  ensure_source_unchanged(fingerprint, after, target)
1202
1225
  await sftp_client.remove(path)
1203
1226
 
1204
- async def delete(self, path: str) -> None:
1227
+ async def delete(self, path: str) -> str:
1228
+ PathValidator.validate_remote_path(path)
1229
+ connection = await self._conn()
1230
+ target = self._spelled.note(await remote_path(connection, path), path)
1205
1231
  sftp_client = await self._session()
1206
- async with self._needs(path, folder=False):
1207
- await sftp_client.remove(path)
1232
+ await _remote_refuse_home_or_above(connection, sftp_client, [target])
1233
+ async with self._needs(target, folder=False):
1234
+ await sftp_client.remove(target) # a link is removed, not followed
1235
+ return target
1208
1236
 
1209
1237
  async def chmod(self, path: str, mode: int) -> None:
1210
1238
  await sftp_chmod(await self._conn(), path, mode)
@@ -1214,10 +1242,13 @@ class RemoteFiles:
1214
1242
  ) -> str:
1215
1243
  PathValidator.validate_remote_path(path)
1216
1244
  new_name = PathValidator.validate_filename(new_name)
1217
- source = self._spelled.note(await remote_path(await self._conn(), path), path)
1245
+ connection = await self._conn()
1246
+ source = self._spelled.note(await remote_path(connection, path), path)
1247
+ sftp_client = await self._session()
1248
+ await _remote_refuse_home_or_above(connection, sftp_client, [source])
1218
1249
  target = str(PurePosixPath(source).parent / new_name)
1219
1250
  return await _remote_place(
1220
- await self._session(),
1251
+ sftp_client,
1221
1252
  source,
1222
1253
  target,
1223
1254
  move=True,
@@ -1245,13 +1276,16 @@ class RemoteFiles:
1245
1276
  remote_dest_dir = self._spelled.note(
1246
1277
  await remote_path(connection, destination), destination
1247
1278
  )
1279
+ sftp_client = await self._session()
1280
+ if move:
1281
+ await _remote_refuse_home_or_above(connection, sftp_client, [remote_src])
1248
1282
  name = new_name or PurePosixPath(remote_src).name
1249
1283
  if not move:
1250
1284
  # Named after the resolved source: `~` alone has no usable name.
1251
1285
  name = PathValidator.validate_filename(name)
1252
1286
  target = str(PurePosixPath(remote_dest_dir) / name)
1253
1287
  return await _remote_place(
1254
- await self._session(),
1288
+ sftp_client,
1255
1289
  remote_src,
1256
1290
  target,
1257
1291
  move=move,
@@ -1418,11 +1452,13 @@ class RemoteFiles:
1418
1452
  connection = await self._conn()
1419
1453
  validated = await _resolve_tilde_paths(connection, validated, failed)
1420
1454
  sftp_client = await self._session()
1455
+ await _remote_refuse_home_or_above(connection, sftp_client, [v for _, v in validated])
1421
1456
  for orig, vpath in validated:
1422
1457
  self._spelled.note(vpath, orig)
1423
1458
  try:
1424
- attrs = await sftp_client.stat(vpath)
1425
- if stat_mod.S_ISDIR(attrs.permissions or 0):
1459
+ attrs = await sftp_client.lstat(vpath) # a link is removed, not followed
1460
+ mode = attrs.permissions or 0
1461
+ if stat_mod.S_ISDIR(mode) and not stat_mod.S_ISLNK(mode):
1426
1462
  await connection.run(remove_tree_command(vpath), check=True)
1427
1463
  else:
1428
1464
  await sftp_client.remove(vpath)
@@ -1467,6 +1503,10 @@ class RemoteFiles:
1467
1503
  dest_resolved = await _resolve_tilde_destination(connection, dest_validated)
1468
1504
  validated = await _resolve_tilde_paths(connection, validated, failed)
1469
1505
  sftp_client = await self._session()
1506
+ if move:
1507
+ await _remote_refuse_home_or_above(
1508
+ connection, sftp_client, [v for _, v in validated]
1509
+ )
1470
1510
  for orig, vpath in validated:
1471
1511
  self._spelled.note(vpath, orig)
1472
1512
  target = str(PurePosixPath(dest_resolved) / PurePosixPath(vpath).name)
@@ -7,7 +7,7 @@ import logging
7
7
  import os
8
8
  import shlex
9
9
  import time
10
- from collections.abc import Mapping
10
+ from collections.abc import Callable, Mapping
11
11
  from typing import Any, Protocol
12
12
 
13
13
  from . import state
@@ -153,24 +153,58 @@ async def snapshot_all_sessions() -> int:
153
153
  return count
154
154
 
155
155
 
156
- async def snapshot_loop(settings: SnapshotSettings) -> None:
157
- """Background task that periodically snapshots tmux state."""
156
+ PURGE_PERIOD_SECONDS = 3600
157
+
158
+ # Set by ``notify_interval_changed`` to end the loop's wait early. Created by the
159
+ # loop, so it belongs to the loop that runs it.
160
+ _wake: asyncio.Event | None = None
161
+
162
+
163
+ def notify_interval_changed() -> None:
164
+ """Wake the snapshot loop so it reads the new interval now, not after the old sleep."""
165
+ if _wake is not None:
166
+ _wake.set()
167
+
168
+
169
+ async def _sleep_or_wake(interval: float) -> None:
170
+ """Wait *interval* seconds, or until ``notify_interval_changed`` is called."""
171
+ wake = _wake
172
+ if wake is None:
173
+ await asyncio.sleep(interval)
174
+ return
175
+ try:
176
+ await asyncio.wait_for(wake.wait(), timeout=interval)
177
+ except TimeoutError:
178
+ pass
179
+ wake.clear()
180
+
181
+
182
+ async def snapshot_loop(
183
+ settings: SnapshotSettings, *, clock: Callable[[], float] = time.monotonic
184
+ ) -> None:
185
+ """Background task that periodically snapshots tmux state.
186
+
187
+ The stale-snapshot purge runs once every ``PURGE_PERIOD_SECONDS`` of elapsed
188
+ time, whatever the interval is or becomes.
189
+ """
190
+ global _wake
191
+ _wake = asyncio.Event()
158
192
  logger.info(
159
193
  "Snapshot loop started (enabled=%s interval=%ss)",
160
194
  settings.snapshot_enabled,
161
195
  settings.snapshot_interval,
162
196
  )
163
- ticks = 0
197
+ last_purge = clock()
164
198
  while True:
165
199
  interval = max(5, settings.snapshot_interval)
166
- await asyncio.sleep(interval)
167
- ticks += 1
200
+ await _sleep_or_wake(interval)
168
201
  try:
169
202
  if settings.snapshot_enabled:
170
203
  count = await snapshot_all_sessions()
171
204
  if count > 0:
172
205
  logger.debug("Snapshotted %d session(s)", count)
173
- if ticks % max(1, 3600 // interval) == 0:
206
+ if clock() - last_purge >= PURGE_PERIOD_SECONDS:
207
+ last_purge = clock()
174
208
  purged = await state.purge_stale_snapshots_async()
175
209
  if purged > 0:
176
210
  logger.info("Purged %d stale snapshot(s)", purged)
@@ -1,4 +1,4 @@
1
- import{A as e,Ct as t,Et as n,M as r,P as i,U as a,V as o,W as s,b as c,bt as l,et as u,ft as d,it as f,st as p,wt as m,xt as h,y as g}from"./_plugin-vue_export-helper-Bq7SfXed.js";import{i as _,n as v,r as y,t as b}from"./Warning-DdY8ttUA.js";import{ct as x,lt as S}from"./index-D6bev0bd.js";import{E as C,F as w,d as T,l as E,p as D,rt as O,u as k,v as A}from"./runtime-core.esm-bundler-Dg-ZVrJt.js";var j=h(`alert`,`
1
+ import{A as e,Ct as t,Et as n,M as r,P as i,U as a,V as o,W as s,b as c,bt as l,et as u,ft as d,it as f,st as p,wt as m,xt as h,y as g}from"./_plugin-vue_export-helper-Bq7SfXed.js";import{i as _,n as v,r as y,t as b}from"./Warning-DdY8ttUA.js";import{ct as x,lt as S}from"./index-zvBSG0-h.js";import{E as C,F as w,d as T,l as E,p as D,rt as O,u as k,v as A}from"./runtime-core.esm-bundler-Dg-ZVrJt.js";var j=h(`alert`,`
2
2
  line-height: var(--n-line-height);
3
3
  border-radius: var(--n-border-radius);
4
4
  position: relative;
@@ -1 +1 @@
1
- import{A as e,Dt as t,F as n,K as r,L as i,M as a,Ot as o,W as ee,_ as s,d as c,f as l,g as u,i as d,l as f,p,rt as m,tt as te,u as h,ut as g,v as ne}from"./runtime-core.esm-bundler-Dg-ZVrJt.js";import{It as re,Lt as _,n as ie,s as v,t as y}from"./_plugin-vue_export-helper-Bq7SfXed.js";import{At as b,F as x,I as ae,It as S,L as C,b as w,d as T,f as E,ht as D,vt as O,y as k}from"./http-5jBZtK3s.js";import{_ as oe,g as se}from"./useApi-SF8tY_yo-CGxurG4J.js";import{t as A}from"./Alert-DIRa-mLO.js";import{C as j,t as ce}from"./Tag-DuIn8UVX.js";import{F as le,J as ue,S as de,T as fe,X as M,y as pe}from"./index-D6bev0bd.js";import{t as N}from"./Input-DnapVD4O.js";import{r as P}from"./light-Bw_xNwn4.js";import{t as F}from"./Select-Cc7bvkLZ.js";import{t as me}from"./Spin-Dd0ayTqa.js";import{t as he}from"./composables-t62CRov_.js";import{t as ge}from"./PhCopy.vue-FKiTGwf5.js";import{t as _e}from"./PhFolderOpen.vue-DXTvd5o3.js";import{t as I}from"./PhPencilSimple.vue-DEromwmD.js";import{t as L}from"./PhTrash.vue-B_MgjXry.js";import{i as ve}from"./i18n-gQdbl5sJ.js";import{i as R,n as ye}from"./bootstrap-DMKDM0gE.js";var be=R(`artifacts`,()=>{let e=m([]),t=m([]),n=m({}),r=m(new Set),i=m(!1),a=m(null),o=m({}),ee=f(()=>{let e={};for(let n of t.value)(e[n.project_id]??=[]).push(n);for(let t of Object.values(e))t.sort((e,t)=>`${e.group_path}/${e.title||e.source_path}`.localeCompare(`${t.group_path}/${t.title||t.source_path}`));return e});async function s(n,r=o.value){o.value={...r},i.value=!0,a.value=null;try{let[i,a]=await Promise.all([ae(n),C(n,r)]);e.value=[...i.projects].sort((e,t)=>e.name.localeCompare(t.name)),t.value=a.artifacts}catch(e){throw a.value=S(e),e}finally{i.value=!1}}async function c(e,t){if(n.value[e])return n.value[e];r.value.add(e);try{let r=await x(e,t);return n.value[e]=r.pages,r.pages}finally{r.value.delete(e)}}async function l(e,t){r.value.add(e);try{let r=await O(e,t);return n.value[e]=r.pages,r.pages}finally{r.value.delete(e)}}async function u(e,t){let n=await T(e,t);return await s(t),n}async function d(e,t,r){let i=await b(e,t,r);return delete n.value[e],await s(r),i}async function p(e,r){let i=await k(e,r);return delete n.value[e],t.value=t.value.filter(t=>t.id!==e),await s(r),i.removed}async function te(e,t){let n=await E(e,t);return await s(t),n}async function h(e,t,n){let r=await D(e,t,n);return await s(n),r}async function g(e,t){let r=await w(e,!0,t);return n.value={},await s(t),r}return{projects:e,artifacts:t,pagesByArtifact:n,loadingPages:r,loading:i,error:a,artifactsByProject:ee,refresh:s,ensurePages:c,rescan:l,create:u,update:d,remove:p,createProject:te,renameProject:h,removeProject:g}});function z(e){let t=e.replace(/^\[|\]$/g,``).toLowerCase();return t===`localhost`||t===`127.0.0.1`||t===`::1`}function xe(e,t,n=typeof location<`u`?location.hostname:``){return!t||!z(n)?null:`http://127.0.0.1:${t}${e.startsWith(`/`)?e:`/${e}`}`}var Se={class:`artifacts-view`},Ce={class:`page-header`},we={class:`header-actions`},Te={class:`catalog-filters`},Ee={class:`project-header`},De={key:0,class:`group-path`},Oe={class:`artifact-row`},ke={class:`artifact-details`},Ae={class:`artifact-title`},je={class:`artifact-alias`},Me=[`disabled`,`onClick`],Ne={class:`form-grid`},Pe={key:0},Fe={class:`modal-actions`},Ie={class:`modal-actions`},Le=[`src`],B=y(ne({__name:`ArtifactsView`,setup(ne){let y=be(),b=ye(),x=se(),ae=oe(),C=ue(),w=he(),{t:T}=ve(),E=f(()=>b.token||b.payload?.token||null),D=f(()=>b.payload?.artifact_server_port??null),O=f(()=>xe(`/`,D.value)!==null),k=m(!1),R=m(null),z=m(!1),B=m(null),V=m(``),H=m(null),U=m(new Set),W=m(!1),G=m(``),K=m(null),q=m(null),J=null,Y=te({source_path:``,project:``,group_path:``,mode:`auto`,entrypoint:``,title:``,slug:``,mount_path:``}),Re=[{label:T(`artifacts.mode.auto`),value:`auto`},{label:T(`artifacts.mode.file`),value:`file`},{label:T(`artifacts.mode.site`),value:`site`},{label:T(`artifacts.mode.collection`),value:`collection`}],ze=Re.filter(e=>e.value!==`auto`),Be=f(()=>y.projects.map(e=>({label:e.name,value:e.slug}))),X=f(()=>!!(G.value.trim()||K.value||q.value)),Ve=f(()=>X.value?y.projects.filter(e=>y.artifactsByProject[e.id]?.length):y.projects);function He(e){return e.split(/[/\\]/).filter(Boolean).pop()||e}function Ue(e){return e.title||He(e.source_path)}function We(){R.value=null,Object.assign(Y,{source_path:``,project:``,group_path:``,mode:`auto`,entrypoint:``,title:``,slug:``,mount_path:``})}function Ge(){We(),k.value=!0}function Ke(e){R.value=e.id,Object.assign(Y,{source_path:e.source_path,project:e.project_name,group_path:e.group_path,mode:e.mode,entrypoint:e.entrypoint||``,title:e.title||``,slug:e.slug,mount_path:e.mount_path?.replace(/^\//,``)||``}),k.value=!0}async function qe(){W.value=!0;try{let e={source_path:Y.source_path,project:Y.project||void 0,group_path:Y.group_path,mode:Y.mode,entrypoint:R.value?Y.entrypoint||null:Y.entrypoint||void 0,title:R.value?Y.title||null:Y.title||void 0,slug:R.value?Y.slug:Y.slug||void 0,mount_path:R.value?Y.mount_path||null:Y.mount_path||void 0};if(R.value)await y.update(R.value,e,E.value),C.success(T(`artifacts.updated`));else{let t=await y.create(e,E.value);C.success(t.created?T(`artifacts.registered`):T(`artifacts.already_registered`))}k.value=!1,We()}catch(e){C.error(S(e))}finally{W.value=!1}}async function Z(e){let t=new Set(U.value);if(t.has(e.id))t.delete(e.id),U.value=t;else try{await y.ensurePages(e.id,E.value),t.add(e.id),U.value=t}catch(e){C.error(S(e))}}function Q(e){return xe(e,D.value)}function Je(e){let t=Q(e.serve_path);if(!t)return;let n=window.open(t,`_blank`,`noopener,noreferrer`);n&&(n.opener=null)}async function Ye(e){try{let t=await y.ensurePages(e.id,E.value),n=t[0]?Q(t[0].serve_path):null;if(!n){C.warning(T(`artifacts.local_only`));return}H.value=n}catch(e){C.error(S(e))}}async function Xe(e){try{let t=await y.rescan(e.id,E.value);U.value=new Set([...U.value,e.id]),C.success(T(`artifacts.rescanned`,{n:t.length}))}catch(e){C.error(S(e))}}function Ze(e){w.warning({title:T(`artifacts.unregister`),content:T(`artifacts.unregister_confirm`,{title:Ue(e)}),positiveText:T(`artifacts.unregister`),negativeText:T(`common.cancel`),onPositiveClick:async()=>{await y.remove(e.id,E.value),C.success(T(`artifacts.unregistered`))}})}async function Qe(e){let t=Q(e.mount_path||e.alias_path)||`${window.location.origin}/app/artifacts/${e.id}`;await navigator.clipboard.writeText(t),C.success(T(`artifacts.link_copied`))}async function $e(){await y.refresh(E.value,{q:G.value.trim()||void 0,project:K.value||void 0,mode:q.value||void 0})}ee([G,K,q],()=>{J&&clearTimeout(J),J=setTimeout(()=>{$e().catch(e=>{C.error(S(e))})},220)}),e(()=>{J&&clearTimeout(J)});function $(e){B.value=e||null,V.value=e?.name||``,z.value=!0}async function et(){try{B.value?await y.renameProject(B.value.id,V.value,E.value):await y.createProject(V.value,E.value),z.value=!1,C.success(T(`artifacts.project_saved`))}catch(e){C.error(S(e))}}function tt(e){w.warning({title:T(`artifacts.project_remove`),content:T(`artifacts.project_remove_confirm`,{name:e.name,n:e.registration_count}),positiveText:T(`artifacts.project_remove`),negativeText:T(`common.cancel`),onPositiveClick:async()=>{await y.removeProject(e.id,E.value),C.success(T(`artifacts.project_removed`))}})}return a(async()=>{b.payload||await b.bootstrap(),await y.refresh(E.value);let e=typeof x.params.id==`string`?x.params.id:null;if(e){let t=y.artifacts.find(t=>t.id===e);t&&(await Z(t),ae.replace(`/artifacts`))}}),(e,a)=>(n(),p(`div`,Se,[h(`div`,Ce,[h(`div`,null,[h(`h1`,null,o(g(T)(`artifacts.title`)),1),h(`p`,null,o(g(T)(`artifacts.subtitle`)),1)]),h(`div`,we,[s(g(v),{secondary:``,onClick:a[0]||=e=>$()},{icon:r(()=>[s(g(M),null,{default:r(()=>[s(g(_e))]),_:1})]),default:r(()=>[u(` `+o(g(T)(`artifacts.new_project`)),1)]),_:1}),s(g(v),{type:`primary`,onClick:Ge},{icon:r(()=>[s(g(M),null,{default:r(()=>[s(g(pe))]),_:1})]),default:r(()=>[u(` `+o(g(T)(`artifacts.register`)),1)]),_:1})])]),O.value?l(``,!0):(n(),c(g(A),{key:0,type:`warning`,class:`local-alert`},{default:r(()=>[u(o(g(T)(`artifacts.local_only`)),1)]),_:1})),g(y).error?(n(),c(g(A),{key:1,type:`error`,class:`local-alert`},{default:r(()=>[u(o(g(y).error),1)]),_:1})):l(``,!0),h(`div`,Te,[s(g(N),{value:G.value,"onUpdate:value":a[1]||=e=>G.value=e,clearable:``,placeholder:g(T)(`artifacts.search_placeholder`)},{prefix:r(()=>[s(g(M),null,{default:r(()=>[s(g(de))]),_:1})]),_:1},8,[`value`,`placeholder`]),s(g(F),{value:K.value,"onUpdate:value":a[2]||=e=>K.value=e,clearable:``,options:Be.value,placeholder:g(T)(`artifacts.all_projects`)},null,8,[`value`,`options`,`placeholder`]),s(g(F),{value:q.value,"onUpdate:value":a[3]||=e=>q.value=e,clearable:``,options:g(ze),placeholder:g(T)(`artifacts.all_modes`)},null,8,[`value`,`options`,`placeholder`])]),s(g(me),{show:g(y).loading},{default:r(()=>[!g(y).loading&&g(y).projects.length===0?(n(),c(g(j),{key:0,description:g(T)(`artifacts.empty`)},{extra:r(()=>[s(g(v),{type:`primary`,onClick:Ge},{default:r(()=>[u(o(g(T)(`artifacts.register`)),1)]),_:1})]),_:1},8,[`description`])):l(``,!0),!g(y).loading&&X.value&&g(y).artifacts.length===0?(n(),c(g(j),{key:1,description:g(T)(`artifacts.no_matches`)},null,8,[`description`])):l(``,!0),(n(!0),p(d,null,i(Ve.value,e=>(n(),p(`section`,{key:e.id,class:`project-section`},[h(`div`,Ee,[h(`div`,null,[h(`h2`,null,o(e.name),1),h(`span`,null,o(g(T)(`artifacts.registration_count`,{n:e.registration_count})),1)]),h(`div`,null,[s(g(v),{quaternary:``,circle:``,onClick:t=>$(e),title:g(T)(`common.rename`)},{default:r(()=>[s(g(M),null,{default:r(()=>[s(g(I))]),_:1})]),_:1},8,[`onClick`,`title`]),s(g(v),{quaternary:``,circle:``,type:`error`,onClick:t=>tt(e),title:g(T)(`artifacts.project_remove`)},{default:r(()=>[s(g(M),null,{default:r(()=>[s(g(L))]),_:1})]),_:1},8,[`onClick`,`title`])])]),g(y).artifactsByProject[e.id]?.length?l(``,!0):(n(),c(g(j),{key:0,description:g(T)(`artifacts.project_empty`),size:`small`},null,8,[`description`])),(n(!0),p(d,null,i(g(y).artifactsByProject[e.id]||[],e=>(n(),p(`div`,{key:e.id,class:`artifact-indent`,style:t({"--depth":String((e.group_path.match(/\//g)||[]).length)})},[e.group_path?(n(),p(`div`,De,o(e.group_path.split(`/`).join(` › `)),1)):l(``,!0),s(g(ie),{size:`small`,class:`artifact-card`,role:`button`,tabindex:`0`,onClick:t=>Z(e),onKeydown:[re(_(t=>Z(e),[`prevent`]),[`enter`]),re(_(t=>Z(e),[`prevent`]),[`space`])]},{default:r(()=>[h(`div`,Oe,[h(`div`,ke,[h(`div`,Ae,[h(`span`,null,o(Ue(e)),1),s(g(ce),{size:`small`},{default:r(()=>[u(o(e.mode),1)]),_:2},1024),s(g(ce),{size:`small`,type:e.exists?`success`:`error`},{default:r(()=>[u(o(e.exists?g(T)(`artifacts.ready`):g(T)(`artifacts.missing`)),1)]),_:2},1032,[`type`])]),h(`code`,null,o(e.source_path),1),h(`code`,je,o(e.mount_path||e.alias_path),1)]),h(`div`,{class:`artifact-actions`,onClick:a[4]||=_(()=>{},[`stop`]),onKeydown:a[5]||=_(()=>{},[`stop`])},[s(g(v),{size:`small`,onClick:t=>Z(e)},{default:r(()=>[u(o(U.value.has(e.id)?g(T)(`common.close`):g(T)(`artifacts.pages`)),1)]),_:2},1032,[`onClick`]),s(g(v),{size:`small`,disabled:!e.exists,onClick:t=>Ye(e)},{icon:r(()=>[s(g(M),null,{default:r(()=>[s(g(fe))]),_:1})]),default:r(()=>[u(` `+o(g(T)(`common.preview`)),1)]),_:1},8,[`disabled`,`onClick`]),s(g(v),{size:`small`,onClick:t=>Qe(e)},{icon:r(()=>[s(g(M),null,{default:r(()=>[s(g(ge))]),_:1})]),_:1},8,[`onClick`]),s(g(v),{size:`small`,onClick:t=>Xe(e)},{icon:r(()=>[s(g(M),null,{default:r(()=>[s(g(le))]),_:1})]),_:1},8,[`onClick`]),s(g(v),{size:`small`,onClick:t=>Ke(e)},{icon:r(()=>[s(g(M),null,{default:r(()=>[s(g(I))]),_:1})]),_:1},8,[`onClick`]),s(g(v),{size:`small`,type:`error`,onClick:t=>Ze(e)},{icon:r(()=>[s(g(M),null,{default:r(()=>[s(g(L))]),_:1})]),_:1},8,[`onClick`])],32)]),U.value.has(e.id)?(n(),p(`div`,{key:0,class:`page-list`,onClick:a[6]||=_(()=>{},[`stop`]),onKeydown:a[7]||=_(()=>{},[`stop`])},[g(y).loadingPages.has(e.id)?(n(),c(g(me),{key:0,size:`small`})):g(y).pagesByArtifact[e.id]?.length?l(``,!0):(n(),c(g(j),{key:1,description:g(T)(`artifacts.no_pages`),size:`small`},null,8,[`description`])),(n(!0),p(d,null,i(g(y).pagesByArtifact[e.id]||[],t=>(n(),p(`button`,{key:t.relative_path,class:`page-link`,disabled:!O.value,onClick:e=>Je(t)},[h(`span`,null,o(t.title),1),h(`code`,null,o(t.relative_path||e.entrypoint||He(e.source_path)),1)],8,Me))),128))],32)):l(``,!0)]),_:2},1032,[`onClick`,`onKeydown`])],4))),128))]))),128))]),_:1},8,[`show`]),s(g(P),{show:k.value,"onUpdate:show":a[17]||=e=>k.value=e,preset:`card`,title:R.value?g(T)(`artifacts.edit`):g(T)(`artifacts.register`),class:`form-modal`},{default:r(()=>[h(`div`,Ne,[h(`label`,null,[h(`span`,null,o(g(T)(`artifacts.source`)),1),s(g(N),{value:Y.source_path,"onUpdate:value":a[8]||=e=>Y.source_path=e,placeholder:g(T)(`artifacts.source_placeholder`)},null,8,[`value`,`placeholder`])]),h(`label`,null,[h(`span`,null,o(g(T)(`artifacts.project`)),1),s(g(N),{value:Y.project,"onUpdate:value":a[9]||=e=>Y.project=e,placeholder:g(T)(`artifacts.project_hint`)},null,8,[`value`,`placeholder`])]),h(`label`,null,[h(`span`,null,o(g(T)(`artifacts.group`)),1),s(g(N),{value:Y.group_path,"onUpdate:value":a[10]||=e=>Y.group_path=e,placeholder:`design/experiments`},null,8,[`value`])]),h(`label`,null,[h(`span`,null,o(g(T)(`artifacts.mode`)),1),s(g(F),{value:Y.mode,"onUpdate:value":a[11]||=e=>Y.mode=e,options:Re},null,8,[`value`])]),Y.mode===`site`||Y.mode===`auto`?(n(),p(`label`,Pe,[h(`span`,null,o(g(T)(`artifacts.entrypoint`)),1),s(g(N),{value:Y.entrypoint,"onUpdate:value":a[12]||=e=>Y.entrypoint=e,placeholder:`index.html`},null,8,[`value`])])):l(``,!0),h(`label`,null,[h(`span`,null,o(g(T)(`artifacts.title_override`)),1),s(g(N),{value:Y.title,"onUpdate:value":a[13]||=e=>Y.title=e,placeholder:g(T)(`artifacts.title_hint`)},null,8,[`value`,`placeholder`])]),h(`label`,null,[h(`span`,null,o(g(T)(`artifacts.slug`)),1),s(g(N),{value:Y.slug,"onUpdate:value":a[14]||=e=>Y.slug=e,placeholder:`quarterly-summary`},null,8,[`value`])]),h(`label`,null,[h(`span`,null,o(g(T)(`artifacts.mount`)),1),s(g(N),{value:Y.mount_path,"onUpdate:value":a[15]||=e=>Y.mount_path=e,placeholder:`published/reports`},null,8,[`value`])])]),Y.mode===`file`?l(``,!0):(n(),c(g(A),{key:0,type:`info`,class:`scope-note`},{default:r(()=>[u(o(g(T)(`artifacts.directory_scope`)),1)]),_:1})),h(`div`,Fe,[s(g(v),{onClick:a[16]||=e=>k.value=!1},{default:r(()=>[u(o(g(T)(`common.cancel`)),1)]),_:1}),s(g(v),{type:`primary`,loading:W.value,disabled:!Y.source_path,onClick:qe},{default:r(()=>[u(o(g(T)(`common.save`)),1)]),_:1},8,[`loading`,`disabled`])])]),_:1},8,[`show`,`title`]),s(g(P),{show:z.value,"onUpdate:show":a[20]||=e=>z.value=e,preset:`card`,title:B.value?g(T)(`artifacts.rename_project`):g(T)(`artifacts.new_project`),class:`project-modal`},{default:r(()=>[s(g(N),{value:V.value,"onUpdate:value":a[18]||=e=>V.value=e,placeholder:g(T)(`artifacts.project`)},null,8,[`value`,`placeholder`]),h(`div`,Ie,[s(g(v),{onClick:a[19]||=e=>z.value=!1},{default:r(()=>[u(o(g(T)(`common.cancel`)),1)]),_:1}),s(g(v),{type:`primary`,disabled:!V.value.trim(),onClick:et},{default:r(()=>[u(o(g(T)(`common.save`)),1)]),_:1},8,[`disabled`])])]),_:1},8,[`show`,`title`]),s(g(P),{show:!!H.value,preset:`card`,title:g(T)(`artifacts.preview_title`),class:`preview-modal`,"onUpdate:show":a[21]||=e=>{e||(H.value=null)}},{default:r(()=>[H.value?(n(),p(`iframe`,{key:0,src:H.value,sandbox:`allow-scripts allow-same-origin allow-forms allow-downloads allow-modals allow-popups`,referrerpolicy:`no-referrer`,class:`artifact-frame`},null,8,Le)):l(``,!0)]),_:1},8,[`show`,`title`])]))}}),[[`__scopeId`,`data-v-78313e8c`]]);export{B as default};
1
+ import{A as e,Dt as t,F as n,K as r,L as i,M as a,Ot as o,W as ee,_ as s,d as c,f as l,g as u,i as d,l as f,p,rt as m,tt as te,u as h,ut as g,v as ne}from"./runtime-core.esm-bundler-Dg-ZVrJt.js";import{It as re,Lt as _,n as ie,s as v,t as y}from"./_plugin-vue_export-helper-Bq7SfXed.js";import{At as b,F as x,I as ae,It as S,L as C,b as w,d as T,f as E,ht as D,vt as O,y as k}from"./http-C62oEuQ5.js";import{_ as oe,g as se}from"./useApi-SF8tY_yo-CGxurG4J.js";import{t as A}from"./Alert-jRvWI2WC.js";import{C as j,t as ce}from"./Tag-DuIn8UVX.js";import{F as le,J as ue,S as de,T as fe,X as M,y as pe}from"./index-zvBSG0-h.js";import{t as N}from"./Input-DnapVD4O.js";import{r as P}from"./light-Bw_xNwn4.js";import{t as F}from"./Select-Cc7bvkLZ.js";import{t as me}from"./Spin-Dd0ayTqa.js";import{t as he}from"./composables-t62CRov_.js";import{t as ge}from"./PhCopy.vue-FKiTGwf5.js";import{t as _e}from"./PhFolderOpen.vue-DXTvd5o3.js";import{t as I}from"./PhPencilSimple.vue-DEromwmD.js";import{t as L}from"./PhTrash.vue-B_MgjXry.js";import{i as ve}from"./i18n-gQdbl5sJ.js";import{i as R,n as ye}from"./bootstrap-C2zuJ98F.js";var be=R(`artifacts`,()=>{let e=m([]),t=m([]),n=m({}),r=m(new Set),i=m(!1),a=m(null),o=m({}),ee=f(()=>{let e={};for(let n of t.value)(e[n.project_id]??=[]).push(n);for(let t of Object.values(e))t.sort((e,t)=>`${e.group_path}/${e.title||e.source_path}`.localeCompare(`${t.group_path}/${t.title||t.source_path}`));return e});async function s(n,r=o.value){o.value={...r},i.value=!0,a.value=null;try{let[i,a]=await Promise.all([ae(n),C(n,r)]);e.value=[...i.projects].sort((e,t)=>e.name.localeCompare(t.name)),t.value=a.artifacts}catch(e){throw a.value=S(e),e}finally{i.value=!1}}async function c(e,t){if(n.value[e])return n.value[e];r.value.add(e);try{let r=await x(e,t);return n.value[e]=r.pages,r.pages}finally{r.value.delete(e)}}async function l(e,t){r.value.add(e);try{let r=await O(e,t);return n.value[e]=r.pages,r.pages}finally{r.value.delete(e)}}async function u(e,t){let n=await T(e,t);return await s(t),n}async function d(e,t,r){let i=await b(e,t,r);return delete n.value[e],await s(r),i}async function p(e,r){let i=await k(e,r);return delete n.value[e],t.value=t.value.filter(t=>t.id!==e),await s(r),i.removed}async function te(e,t){let n=await E(e,t);return await s(t),n}async function h(e,t,n){let r=await D(e,t,n);return await s(n),r}async function g(e,t){let r=await w(e,!0,t);return n.value={},await s(t),r}return{projects:e,artifacts:t,pagesByArtifact:n,loadingPages:r,loading:i,error:a,artifactsByProject:ee,refresh:s,ensurePages:c,rescan:l,create:u,update:d,remove:p,createProject:te,renameProject:h,removeProject:g}});function z(e){let t=e.replace(/^\[|\]$/g,``).toLowerCase();return t===`localhost`||t===`127.0.0.1`||t===`::1`}function xe(e,t,n=typeof location<`u`?location.hostname:``){return!t||!z(n)?null:`http://127.0.0.1:${t}${e.startsWith(`/`)?e:`/${e}`}`}var Se={class:`artifacts-view`},Ce={class:`page-header`},we={class:`header-actions`},Te={class:`catalog-filters`},Ee={class:`project-header`},De={key:0,class:`group-path`},Oe={class:`artifact-row`},ke={class:`artifact-details`},Ae={class:`artifact-title`},je={class:`artifact-alias`},Me=[`disabled`,`onClick`],Ne={class:`form-grid`},Pe={key:0},Fe={class:`modal-actions`},Ie={class:`modal-actions`},Le=[`src`],B=y(ne({__name:`ArtifactsView`,setup(ne){let y=be(),b=ye(),x=se(),ae=oe(),C=ue(),w=he(),{t:T}=ve(),E=f(()=>b.token||b.payload?.token||null),D=f(()=>b.payload?.artifact_server_port??null),O=f(()=>xe(`/`,D.value)!==null),k=m(!1),R=m(null),z=m(!1),B=m(null),V=m(``),H=m(null),U=m(new Set),W=m(!1),G=m(``),K=m(null),q=m(null),J=null,Y=te({source_path:``,project:``,group_path:``,mode:`auto`,entrypoint:``,title:``,slug:``,mount_path:``}),Re=[{label:T(`artifacts.mode.auto`),value:`auto`},{label:T(`artifacts.mode.file`),value:`file`},{label:T(`artifacts.mode.site`),value:`site`},{label:T(`artifacts.mode.collection`),value:`collection`}],ze=Re.filter(e=>e.value!==`auto`),Be=f(()=>y.projects.map(e=>({label:e.name,value:e.slug}))),X=f(()=>!!(G.value.trim()||K.value||q.value)),Ve=f(()=>X.value?y.projects.filter(e=>y.artifactsByProject[e.id]?.length):y.projects);function He(e){return e.split(/[/\\]/).filter(Boolean).pop()||e}function Ue(e){return e.title||He(e.source_path)}function We(){R.value=null,Object.assign(Y,{source_path:``,project:``,group_path:``,mode:`auto`,entrypoint:``,title:``,slug:``,mount_path:``})}function Ge(){We(),k.value=!0}function Ke(e){R.value=e.id,Object.assign(Y,{source_path:e.source_path,project:e.project_name,group_path:e.group_path,mode:e.mode,entrypoint:e.entrypoint||``,title:e.title||``,slug:e.slug,mount_path:e.mount_path?.replace(/^\//,``)||``}),k.value=!0}async function qe(){W.value=!0;try{let e={source_path:Y.source_path,project:Y.project||void 0,group_path:Y.group_path,mode:Y.mode,entrypoint:R.value?Y.entrypoint||null:Y.entrypoint||void 0,title:R.value?Y.title||null:Y.title||void 0,slug:R.value?Y.slug:Y.slug||void 0,mount_path:R.value?Y.mount_path||null:Y.mount_path||void 0};if(R.value)await y.update(R.value,e,E.value),C.success(T(`artifacts.updated`));else{let t=await y.create(e,E.value);C.success(t.created?T(`artifacts.registered`):T(`artifacts.already_registered`))}k.value=!1,We()}catch(e){C.error(S(e))}finally{W.value=!1}}async function Z(e){let t=new Set(U.value);if(t.has(e.id))t.delete(e.id),U.value=t;else try{await y.ensurePages(e.id,E.value),t.add(e.id),U.value=t}catch(e){C.error(S(e))}}function Q(e){return xe(e,D.value)}function Je(e){let t=Q(e.serve_path);if(!t)return;let n=window.open(t,`_blank`,`noopener,noreferrer`);n&&(n.opener=null)}async function Ye(e){try{let t=await y.ensurePages(e.id,E.value),n=t[0]?Q(t[0].serve_path):null;if(!n){C.warning(T(`artifacts.local_only`));return}H.value=n}catch(e){C.error(S(e))}}async function Xe(e){try{let t=await y.rescan(e.id,E.value);U.value=new Set([...U.value,e.id]),C.success(T(`artifacts.rescanned`,{n:t.length}))}catch(e){C.error(S(e))}}function Ze(e){w.warning({title:T(`artifacts.unregister`),content:T(`artifacts.unregister_confirm`,{title:Ue(e)}),positiveText:T(`artifacts.unregister`),negativeText:T(`common.cancel`),onPositiveClick:async()=>{await y.remove(e.id,E.value),C.success(T(`artifacts.unregistered`))}})}async function Qe(e){let t=Q(e.mount_path||e.alias_path)||`${window.location.origin}/app/artifacts/${e.id}`;await navigator.clipboard.writeText(t),C.success(T(`artifacts.link_copied`))}async function $e(){await y.refresh(E.value,{q:G.value.trim()||void 0,project:K.value||void 0,mode:q.value||void 0})}ee([G,K,q],()=>{J&&clearTimeout(J),J=setTimeout(()=>{$e().catch(e=>{C.error(S(e))})},220)}),e(()=>{J&&clearTimeout(J)});function $(e){B.value=e||null,V.value=e?.name||``,z.value=!0}async function et(){try{B.value?await y.renameProject(B.value.id,V.value,E.value):await y.createProject(V.value,E.value),z.value=!1,C.success(T(`artifacts.project_saved`))}catch(e){C.error(S(e))}}function tt(e){w.warning({title:T(`artifacts.project_remove`),content:T(`artifacts.project_remove_confirm`,{name:e.name,n:e.registration_count}),positiveText:T(`artifacts.project_remove`),negativeText:T(`common.cancel`),onPositiveClick:async()=>{await y.removeProject(e.id,E.value),C.success(T(`artifacts.project_removed`))}})}return a(async()=>{b.payload||await b.bootstrap(),await y.refresh(E.value);let e=typeof x.params.id==`string`?x.params.id:null;if(e){let t=y.artifacts.find(t=>t.id===e);t&&(await Z(t),ae.replace(`/artifacts`))}}),(e,a)=>(n(),p(`div`,Se,[h(`div`,Ce,[h(`div`,null,[h(`h1`,null,o(g(T)(`artifacts.title`)),1),h(`p`,null,o(g(T)(`artifacts.subtitle`)),1)]),h(`div`,we,[s(g(v),{secondary:``,onClick:a[0]||=e=>$()},{icon:r(()=>[s(g(M),null,{default:r(()=>[s(g(_e))]),_:1})]),default:r(()=>[u(` `+o(g(T)(`artifacts.new_project`)),1)]),_:1}),s(g(v),{type:`primary`,onClick:Ge},{icon:r(()=>[s(g(M),null,{default:r(()=>[s(g(pe))]),_:1})]),default:r(()=>[u(` `+o(g(T)(`artifacts.register`)),1)]),_:1})])]),O.value?l(``,!0):(n(),c(g(A),{key:0,type:`warning`,class:`local-alert`},{default:r(()=>[u(o(g(T)(`artifacts.local_only`)),1)]),_:1})),g(y).error?(n(),c(g(A),{key:1,type:`error`,class:`local-alert`},{default:r(()=>[u(o(g(y).error),1)]),_:1})):l(``,!0),h(`div`,Te,[s(g(N),{value:G.value,"onUpdate:value":a[1]||=e=>G.value=e,clearable:``,placeholder:g(T)(`artifacts.search_placeholder`)},{prefix:r(()=>[s(g(M),null,{default:r(()=>[s(g(de))]),_:1})]),_:1},8,[`value`,`placeholder`]),s(g(F),{value:K.value,"onUpdate:value":a[2]||=e=>K.value=e,clearable:``,options:Be.value,placeholder:g(T)(`artifacts.all_projects`)},null,8,[`value`,`options`,`placeholder`]),s(g(F),{value:q.value,"onUpdate:value":a[3]||=e=>q.value=e,clearable:``,options:g(ze),placeholder:g(T)(`artifacts.all_modes`)},null,8,[`value`,`options`,`placeholder`])]),s(g(me),{show:g(y).loading},{default:r(()=>[!g(y).loading&&g(y).projects.length===0?(n(),c(g(j),{key:0,description:g(T)(`artifacts.empty`)},{extra:r(()=>[s(g(v),{type:`primary`,onClick:Ge},{default:r(()=>[u(o(g(T)(`artifacts.register`)),1)]),_:1})]),_:1},8,[`description`])):l(``,!0),!g(y).loading&&X.value&&g(y).artifacts.length===0?(n(),c(g(j),{key:1,description:g(T)(`artifacts.no_matches`)},null,8,[`description`])):l(``,!0),(n(!0),p(d,null,i(Ve.value,e=>(n(),p(`section`,{key:e.id,class:`project-section`},[h(`div`,Ee,[h(`div`,null,[h(`h2`,null,o(e.name),1),h(`span`,null,o(g(T)(`artifacts.registration_count`,{n:e.registration_count})),1)]),h(`div`,null,[s(g(v),{quaternary:``,circle:``,onClick:t=>$(e),title:g(T)(`common.rename`)},{default:r(()=>[s(g(M),null,{default:r(()=>[s(g(I))]),_:1})]),_:1},8,[`onClick`,`title`]),s(g(v),{quaternary:``,circle:``,type:`error`,onClick:t=>tt(e),title:g(T)(`artifacts.project_remove`)},{default:r(()=>[s(g(M),null,{default:r(()=>[s(g(L))]),_:1})]),_:1},8,[`onClick`,`title`])])]),g(y).artifactsByProject[e.id]?.length?l(``,!0):(n(),c(g(j),{key:0,description:g(T)(`artifacts.project_empty`),size:`small`},null,8,[`description`])),(n(!0),p(d,null,i(g(y).artifactsByProject[e.id]||[],e=>(n(),p(`div`,{key:e.id,class:`artifact-indent`,style:t({"--depth":String((e.group_path.match(/\//g)||[]).length)})},[e.group_path?(n(),p(`div`,De,o(e.group_path.split(`/`).join(` › `)),1)):l(``,!0),s(g(ie),{size:`small`,class:`artifact-card`,role:`button`,tabindex:`0`,onClick:t=>Z(e),onKeydown:[re(_(t=>Z(e),[`prevent`]),[`enter`]),re(_(t=>Z(e),[`prevent`]),[`space`])]},{default:r(()=>[h(`div`,Oe,[h(`div`,ke,[h(`div`,Ae,[h(`span`,null,o(Ue(e)),1),s(g(ce),{size:`small`},{default:r(()=>[u(o(e.mode),1)]),_:2},1024),s(g(ce),{size:`small`,type:e.exists?`success`:`error`},{default:r(()=>[u(o(e.exists?g(T)(`artifacts.ready`):g(T)(`artifacts.missing`)),1)]),_:2},1032,[`type`])]),h(`code`,null,o(e.source_path),1),h(`code`,je,o(e.mount_path||e.alias_path),1)]),h(`div`,{class:`artifact-actions`,onClick:a[4]||=_(()=>{},[`stop`]),onKeydown:a[5]||=_(()=>{},[`stop`])},[s(g(v),{size:`small`,onClick:t=>Z(e)},{default:r(()=>[u(o(U.value.has(e.id)?g(T)(`common.close`):g(T)(`artifacts.pages`)),1)]),_:2},1032,[`onClick`]),s(g(v),{size:`small`,disabled:!e.exists,onClick:t=>Ye(e)},{icon:r(()=>[s(g(M),null,{default:r(()=>[s(g(fe))]),_:1})]),default:r(()=>[u(` `+o(g(T)(`common.preview`)),1)]),_:1},8,[`disabled`,`onClick`]),s(g(v),{size:`small`,onClick:t=>Qe(e)},{icon:r(()=>[s(g(M),null,{default:r(()=>[s(g(ge))]),_:1})]),_:1},8,[`onClick`]),s(g(v),{size:`small`,onClick:t=>Xe(e)},{icon:r(()=>[s(g(M),null,{default:r(()=>[s(g(le))]),_:1})]),_:1},8,[`onClick`]),s(g(v),{size:`small`,onClick:t=>Ke(e)},{icon:r(()=>[s(g(M),null,{default:r(()=>[s(g(I))]),_:1})]),_:1},8,[`onClick`]),s(g(v),{size:`small`,type:`error`,onClick:t=>Ze(e)},{icon:r(()=>[s(g(M),null,{default:r(()=>[s(g(L))]),_:1})]),_:1},8,[`onClick`])],32)]),U.value.has(e.id)?(n(),p(`div`,{key:0,class:`page-list`,onClick:a[6]||=_(()=>{},[`stop`]),onKeydown:a[7]||=_(()=>{},[`stop`])},[g(y).loadingPages.has(e.id)?(n(),c(g(me),{key:0,size:`small`})):g(y).pagesByArtifact[e.id]?.length?l(``,!0):(n(),c(g(j),{key:1,description:g(T)(`artifacts.no_pages`),size:`small`},null,8,[`description`])),(n(!0),p(d,null,i(g(y).pagesByArtifact[e.id]||[],t=>(n(),p(`button`,{key:t.relative_path,class:`page-link`,disabled:!O.value,onClick:e=>Je(t)},[h(`span`,null,o(t.title),1),h(`code`,null,o(t.relative_path||e.entrypoint||He(e.source_path)),1)],8,Me))),128))],32)):l(``,!0)]),_:2},1032,[`onClick`,`onKeydown`])],4))),128))]))),128))]),_:1},8,[`show`]),s(g(P),{show:k.value,"onUpdate:show":a[17]||=e=>k.value=e,preset:`card`,title:R.value?g(T)(`artifacts.edit`):g(T)(`artifacts.register`),class:`form-modal`},{default:r(()=>[h(`div`,Ne,[h(`label`,null,[h(`span`,null,o(g(T)(`artifacts.source`)),1),s(g(N),{value:Y.source_path,"onUpdate:value":a[8]||=e=>Y.source_path=e,placeholder:g(T)(`artifacts.source_placeholder`)},null,8,[`value`,`placeholder`])]),h(`label`,null,[h(`span`,null,o(g(T)(`artifacts.project`)),1),s(g(N),{value:Y.project,"onUpdate:value":a[9]||=e=>Y.project=e,placeholder:g(T)(`artifacts.project_hint`)},null,8,[`value`,`placeholder`])]),h(`label`,null,[h(`span`,null,o(g(T)(`artifacts.group`)),1),s(g(N),{value:Y.group_path,"onUpdate:value":a[10]||=e=>Y.group_path=e,placeholder:`design/experiments`},null,8,[`value`])]),h(`label`,null,[h(`span`,null,o(g(T)(`artifacts.mode`)),1),s(g(F),{value:Y.mode,"onUpdate:value":a[11]||=e=>Y.mode=e,options:Re},null,8,[`value`])]),Y.mode===`site`||Y.mode===`auto`?(n(),p(`label`,Pe,[h(`span`,null,o(g(T)(`artifacts.entrypoint`)),1),s(g(N),{value:Y.entrypoint,"onUpdate:value":a[12]||=e=>Y.entrypoint=e,placeholder:`index.html`},null,8,[`value`])])):l(``,!0),h(`label`,null,[h(`span`,null,o(g(T)(`artifacts.title_override`)),1),s(g(N),{value:Y.title,"onUpdate:value":a[13]||=e=>Y.title=e,placeholder:g(T)(`artifacts.title_hint`)},null,8,[`value`,`placeholder`])]),h(`label`,null,[h(`span`,null,o(g(T)(`artifacts.slug`)),1),s(g(N),{value:Y.slug,"onUpdate:value":a[14]||=e=>Y.slug=e,placeholder:`quarterly-summary`},null,8,[`value`])]),h(`label`,null,[h(`span`,null,o(g(T)(`artifacts.mount`)),1),s(g(N),{value:Y.mount_path,"onUpdate:value":a[15]||=e=>Y.mount_path=e,placeholder:`published/reports`},null,8,[`value`])])]),Y.mode===`file`?l(``,!0):(n(),c(g(A),{key:0,type:`info`,class:`scope-note`},{default:r(()=>[u(o(g(T)(`artifacts.directory_scope`)),1)]),_:1})),h(`div`,Fe,[s(g(v),{onClick:a[16]||=e=>k.value=!1},{default:r(()=>[u(o(g(T)(`common.cancel`)),1)]),_:1}),s(g(v),{type:`primary`,loading:W.value,disabled:!Y.source_path,onClick:qe},{default:r(()=>[u(o(g(T)(`common.save`)),1)]),_:1},8,[`loading`,`disabled`])])]),_:1},8,[`show`,`title`]),s(g(P),{show:z.value,"onUpdate:show":a[20]||=e=>z.value=e,preset:`card`,title:B.value?g(T)(`artifacts.rename_project`):g(T)(`artifacts.new_project`),class:`project-modal`},{default:r(()=>[s(g(N),{value:V.value,"onUpdate:value":a[18]||=e=>V.value=e,placeholder:g(T)(`artifacts.project`)},null,8,[`value`,`placeholder`]),h(`div`,Ie,[s(g(v),{onClick:a[19]||=e=>z.value=!1},{default:r(()=>[u(o(g(T)(`common.cancel`)),1)]),_:1}),s(g(v),{type:`primary`,disabled:!V.value.trim(),onClick:et},{default:r(()=>[u(o(g(T)(`common.save`)),1)]),_:1},8,[`disabled`])])]),_:1},8,[`show`,`title`]),s(g(P),{show:!!H.value,preset:`card`,title:g(T)(`artifacts.preview_title`),class:`preview-modal`,"onUpdate:show":a[21]||=e=>{e||(H.value=null)}},{default:r(()=>[H.value?(n(),p(`iframe`,{key:0,src:H.value,sandbox:`allow-scripts allow-same-origin allow-forms allow-downloads allow-modals allow-popups`,referrerpolicy:`no-referrer`,class:`artifact-frame`},null,8,Le)):l(``,!0)]),_:1},8,[`show`,`title`])]))}}),[[`__scopeId`,`data-v-78313e8c`]]);export{B as default};
@@ -1 +1 @@
1
- import{F as e,K as t,L as n,M as r,Ot as i,_ as a,d as o,f as s,g as c,i as l,l as u,p as d,u as f,ut as p,v as m}from"./runtime-core.esm-bundler-Dg-ZVrJt.js";import{t as h}from"./Alert-DIRa-mLO.js";import{n as g,s as _,t as v}from"./_plugin-vue_export-helper-Bq7SfXed.js";import{D as y,G as b,J as x,X as S,_ as C,a as w,h as T,n as E}from"./index-D6bev0bd.js";import{t as D}from"./PhPushPinSimple.vue-BMQpg4HB.js";import{i as O}from"./i18n-gQdbl5sJ.js";import{It as k,Lt as A,a as j}from"./http-5jBZtK3s.js";import{n as M}from"./bootstrap-DMKDM0gE.js";import{t as N}from"./favorites-CPj5Zj-5.js";var P={class:`page`},F={class:`page-header`},I={class:`eyebrow`},L={class:`text-muted`},R={class:`box-grid`},z={class:`card-title`},B={class:`text-muted small`},V=v(m({__name:`BoxesView`,setup(m){let v=M(),V=E(),H=N(),U=x(),{t:W}=O(),G=u(()=>v.token||v.payload?.token||null);async function K(){!v.payload&&!v.loading&&await v.bootstrap(),!V.items.length&&!V.loading&&await V.load(G.value),V.items.length&&H.hydrateFromBoxes(V.items)}function q(e,t){V.setBoxes(V.items.map(n=>n.name===e?{...n,...t}:n))}async function J(e){let t=await H.setPinned(e,G.value);H.error?U.error(H.error):(q(e,{pinned:t}),U.success(W(t?`boxes.pinned`:`boxes.unpinned`)))}async function Y(e,t){let n=!H.isFavorite(e,t),r=await H.setFavorite(e,t,n,G.value);if(H.error){U.error(H.error);return}let i=await H.loadBox(e,G.value);i?q(e,{favorites:i.favorites,pinned:i.pinned}):q(e,{favorites:Array.from(H.favoritesForBox(e).values())}),U.success(W(r?`boxes.favorited`:`boxes.unfavorited`))}async function X(e){let t;try{t=await j(e,G.value)}catch(e){U.error(k(e));return}t.status===`online`?U.info(W(`boxes.status_info`,{status:t.status,latency:String(t.latency_ms||0)})):U.error(A(t))}return r(async()=>{await K()}),(r,u)=>(e(),d(`div`,P,[f(`header`,F,[f(`div`,null,[f(`p`,I,i(p(W)(`boxes.title`)),1),f(`h1`,null,i(p(W)(`boxes.subtitle`)),1),f(`p`,L,i(p(W)(`boxes.description`)),1)])]),f(`div`,R,[(e(!0),d(l,null,n(p(V).items,n=>(e(),d(`div`,{key:n.name,class:`box-grid__item`},[a(p(g),{class:`surface-card`,size:`small`},{default:t(()=>[f(`div`,z,[a(p(S),{size:`16`},{default:t(()=>[a(p(y),{weight:`duotone`})]),_:1}),f(`span`,null,i(p(w)(n.name))+` `+i(n.name),1)]),f(`p`,B,i(n.host)+` • `+i(n.transport),1),a(p(b),{size:`small`,style:{"margin-bottom":`8px`}},{default:t(()=>[a(p(_),{size:`tiny`,type:`primary`,onClick:()=>r.$router.push(`/files?box=${encodeURIComponent(n.name)}`)},{default:t(()=>[a(p(S),{size:`14`},{default:t(()=>[a(p(y),{weight:`duotone`})]),_:1}),c(` `+i(p(W)(`boxes.files`)),1)]),_:1},8,[`onClick`]),a(p(_),{size:`tiny`,type:`primary`,onClick:()=>r.$router.push(`/terminal?box=${encodeURIComponent(n.name)}`)},{default:t(()=>[a(p(S),{size:`14`},{default:t(()=>[a(p(T),{weight:`duotone`})]),_:1}),c(` `+i(p(W)(`boxes.terminal`)),1)]),_:1},8,[`onClick`]),a(p(_),{size:`tiny`,onClick:()=>r.$router.push(`/multi-terminal?box=${encodeURIComponent(n.name)}`)},{default:t(()=>[c(i(p(W)(`boxes.multi`)),1)]),_:1},8,[`onClick`])]),_:2},1024),a(p(b),{size:`small`},{default:t(()=>[a(p(_),{size:`tiny`,secondary:``,onClick:()=>J(n.name)},{default:t(()=>[a(p(S),{size:`14`},{default:t(()=>[a(p(D),{weight:`duotone`})]),_:1}),c(` `+i(p(H).isPinned(n.name)?p(W)(`boxes.unpin`):p(W)(`boxes.pin`)),1)]),_:2},1032,[`onClick`]),a(p(_),{size:`tiny`,secondary:``,onClick:()=>Y(n.name,n.default_dir||`/`)},{default:t(()=>[a(p(S),{size:`14`},{default:t(()=>[a(p(C),{weight:`duotone`})]),_:1}),c(` `+i(p(H).isFavorite(n.name,n.default_dir||`/`)?p(W)(`boxes.unfavorite`):p(W)(`boxes.favorite`)),1)]),_:2},1032,[`onClick`]),a(p(_),{size:`tiny`,quaternary:``,onClick:()=>X(n.name)},{default:t(()=>[c(i(p(W)(`common.status`)),1)]),_:1},8,[`onClick`])]),_:2},1024)]),_:2},1024)]))),128))]),p(V).error?(e(),o(p(h),{key:0,type:`error`,closable:``},{default:t(()=>[c(i(p(V).error),1)]),_:1})):p(H).error?(e(),o(p(h),{key:1,type:`error`,closable:``},{default:t(()=>[c(i(p(H).error),1)]),_:1})):s(``,!0)]))}}),[[`__scopeId`,`data-v-08414985`]]);export{V as default};
1
+ import{F as e,K as t,L as n,M as r,Ot as i,_ as a,d as o,f as s,g as c,i as l,l as u,p as d,u as f,ut as p,v as m}from"./runtime-core.esm-bundler-Dg-ZVrJt.js";import{t as h}from"./Alert-jRvWI2WC.js";import{n as g,s as _,t as v}from"./_plugin-vue_export-helper-Bq7SfXed.js";import{D as y,G as b,J as x,X as S,_ as C,a as w,h as T,n as E}from"./index-zvBSG0-h.js";import{t as D}from"./PhPushPinSimple.vue-BMQpg4HB.js";import{i as O}from"./i18n-gQdbl5sJ.js";import{It as k,Lt as A,a as j}from"./http-C62oEuQ5.js";import{n as M}from"./bootstrap-C2zuJ98F.js";import{t as N}from"./favorites-CnJj5YSa.js";var P={class:`page`},F={class:`page-header`},I={class:`eyebrow`},L={class:`text-muted`},R={class:`box-grid`},z={class:`card-title`},B={class:`text-muted small`},V=v(m({__name:`BoxesView`,setup(m){let v=M(),V=E(),H=N(),U=x(),{t:W}=O(),G=u(()=>v.token||v.payload?.token||null);async function K(){!v.payload&&!v.loading&&await v.bootstrap(),!V.items.length&&!V.loading&&await V.load(G.value),V.items.length&&H.hydrateFromBoxes(V.items)}function q(e,t){V.setBoxes(V.items.map(n=>n.name===e?{...n,...t}:n))}async function J(e){let t=await H.setPinned(e,G.value);H.error?U.error(H.error):(q(e,{pinned:t}),U.success(W(t?`boxes.pinned`:`boxes.unpinned`)))}async function Y(e,t){let n=!H.isFavorite(e,t),r=await H.setFavorite(e,t,n,G.value);if(H.error){U.error(H.error);return}let i=await H.loadBox(e,G.value);i?q(e,{favorites:i.favorites,pinned:i.pinned}):q(e,{favorites:Array.from(H.favoritesForBox(e).values())}),U.success(W(r?`boxes.favorited`:`boxes.unfavorited`))}async function X(e){let t;try{t=await j(e,G.value)}catch(e){U.error(k(e));return}t.status===`online`?U.info(W(`boxes.status_info`,{status:t.status,latency:String(t.latency_ms||0)})):U.error(A(t))}return r(async()=>{await K()}),(r,u)=>(e(),d(`div`,P,[f(`header`,F,[f(`div`,null,[f(`p`,I,i(p(W)(`boxes.title`)),1),f(`h1`,null,i(p(W)(`boxes.subtitle`)),1),f(`p`,L,i(p(W)(`boxes.description`)),1)])]),f(`div`,R,[(e(!0),d(l,null,n(p(V).items,n=>(e(),d(`div`,{key:n.name,class:`box-grid__item`},[a(p(g),{class:`surface-card`,size:`small`},{default:t(()=>[f(`div`,z,[a(p(S),{size:`16`},{default:t(()=>[a(p(y),{weight:`duotone`})]),_:1}),f(`span`,null,i(p(w)(n.name))+` `+i(n.name),1)]),f(`p`,B,i(n.host)+` • `+i(n.transport),1),a(p(b),{size:`small`,style:{"margin-bottom":`8px`}},{default:t(()=>[a(p(_),{size:`tiny`,type:`primary`,onClick:()=>r.$router.push(`/files?box=${encodeURIComponent(n.name)}`)},{default:t(()=>[a(p(S),{size:`14`},{default:t(()=>[a(p(y),{weight:`duotone`})]),_:1}),c(` `+i(p(W)(`boxes.files`)),1)]),_:1},8,[`onClick`]),a(p(_),{size:`tiny`,type:`primary`,onClick:()=>r.$router.push(`/terminal?box=${encodeURIComponent(n.name)}`)},{default:t(()=>[a(p(S),{size:`14`},{default:t(()=>[a(p(T),{weight:`duotone`})]),_:1}),c(` `+i(p(W)(`boxes.terminal`)),1)]),_:1},8,[`onClick`]),a(p(_),{size:`tiny`,onClick:()=>r.$router.push(`/multi-terminal?box=${encodeURIComponent(n.name)}`)},{default:t(()=>[c(i(p(W)(`boxes.multi`)),1)]),_:1},8,[`onClick`])]),_:2},1024),a(p(b),{size:`small`},{default:t(()=>[a(p(_),{size:`tiny`,secondary:``,onClick:()=>J(n.name)},{default:t(()=>[a(p(S),{size:`14`},{default:t(()=>[a(p(D),{weight:`duotone`})]),_:1}),c(` `+i(p(H).isPinned(n.name)?p(W)(`boxes.unpin`):p(W)(`boxes.pin`)),1)]),_:2},1032,[`onClick`]),a(p(_),{size:`tiny`,secondary:``,onClick:()=>Y(n.name,n.default_dir||`/`)},{default:t(()=>[a(p(S),{size:`14`},{default:t(()=>[a(p(C),{weight:`duotone`})]),_:1}),c(` `+i(p(H).isFavorite(n.name,n.default_dir||`/`)?p(W)(`boxes.unfavorite`):p(W)(`boxes.favorite`)),1)]),_:2},1032,[`onClick`]),a(p(_),{size:`tiny`,quaternary:``,onClick:()=>X(n.name)},{default:t(()=>[c(i(p(W)(`common.status`)),1)]),_:1},8,[`onClick`])]),_:2},1024)]),_:2},1024)]))),128))]),p(V).error?(e(),o(p(h),{key:0,type:`error`,closable:``},{default:t(()=>[c(i(p(V).error),1)]),_:1})):p(H).error?(e(),o(p(h),{key:1,type:`error`,closable:``},{default:t(()=>[c(i(p(H).error),1)]),_:1})):s(``,!0)]))}}),[[`__scopeId`,`data-v-08414985`]]);export{V as default};