@saluzi/saluzi-edu 0.2.62 → 0.2.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +179 -179
- package/dist/guide/guide-data.json +12 -0
- package/dist/rcs-schema.sql +2 -1
- package/dist/rcs-web/assets/{AdminPanel-Xlza8Stt.js → AdminPanel-CqP_94xa.js} +1 -1
- package/{packages/remote-control-server/web/dist/assets/Claim-BMWwu213.js → dist/rcs-web/assets/Claim-BvfARQ6Q.js} +1 -1
- package/{packages/remote-control-server/web/dist/assets/Dashboard-D5awDzM3.js → dist/rcs-web/assets/Dashboard-BDGi4XpN.js} +1 -1
- package/{packages/remote-control-server/web/dist/assets/Join-ok37ggfZ.js → dist/rcs-web/assets/Join-PPDYBhsJ.js} +1 -1
- package/dist/rcs-web/assets/{Login-5qo97rq-.js → Login-JprQIEpr.js} +1 -1
- package/dist/rcs-web/assets/{Register-D_UOG8ar.js → Register-cuGuAE83.js} +1 -1
- package/dist/rcs-web/assets/{SessionDetail-BbHrR4Qu.js → SessionDetail-D-xhkyLo.js} +5 -5
- package/dist/rcs-web/assets/{SessionVisibilityBadge-Dy4FwTzo.js → SessionVisibilityBadge-91WyR9K6.js} +1 -1
- package/dist/rcs-web/assets/{Setup-GnPeNyH9.js → Setup-Buwa9Y3M.js} +1 -1
- package/dist/rcs-web/assets/{ShareLanding-CUjQydLL.js → ShareLanding-DhwgJb6V.js} +1 -1
- package/dist/rcs-web/assets/{TeamCreate-Ck2fEoUW.js → TeamCreate-CaoinTSG.js} +1 -1
- package/dist/rcs-web/assets/{TeamDetail-De6EPND0.js → TeamDetail-D5ahen24.js} +1 -1
- package/dist/rcs-web/assets/{TeamList-C-0LJRxd.js → TeamList-qCuKKSH3.js} +1 -1
- package/dist/rcs-web/assets/{TeamSettings-BszOrXVW.js → TeamSettings-BaIwImrp.js} +1 -1
- package/dist/rcs-web/assets/{UserSearchInput-CyQWtLL-.js → UserSearchInput-BxcYR_HU.js} +1 -1
- package/dist/rcs-web/assets/{UserSettings-DgyYp-1y.js → UserSettings-zfGfcuWs.js} +1 -1
- package/dist/rcs-web/assets/{arc-BaOPt7k-.js → arc-DwAbF6eM.js} +1 -1
- package/dist/rcs-web/assets/{architectureDiagram-3BPJPVTR-SvIakXbT.js → architectureDiagram-3BPJPVTR-uMOwOwiN.js} +1 -1
- package/{packages/remote-control-server/web/dist/assets/blockDiagram-GPEHLZMM-CiDp9J7i.js → dist/rcs-web/assets/blockDiagram-GPEHLZMM-B5BqFTkP.js} +1 -1
- package/dist/rcs-web/assets/{c4Diagram-AAUBKEIU-D9wzA9ur.js → c4Diagram-AAUBKEIU-D6eienz2.js} +1 -1
- package/dist/rcs-web/assets/channel-CCfqpGSl.js +1 -0
- package/dist/rcs-web/assets/{chunk-2J33WTMH-qfYueRAP.js → chunk-2J33WTMH-DqVxv8yW.js} +1 -1
- package/dist/rcs-web/assets/{chunk-4BX2VUAB-D1V_UCiK.js → chunk-4BX2VUAB-X5o4x8om.js} +1 -1
- package/dist/rcs-web/assets/{chunk-55IACEB6-C67QiGmo.js → chunk-55IACEB6-D7G25_Y5.js} +1 -1
- package/{packages/remote-control-server/web/dist/assets/chunk-727SXJPM-D2Wln4TT.js → dist/rcs-web/assets/chunk-727SXJPM-CoXI1FIy.js} +1 -1
- package/dist/rcs-web/assets/{chunk-AQP2D5EJ-03h8hZhw.js → chunk-AQP2D5EJ-C73Crhqe.js} +1 -1
- package/dist/rcs-web/assets/{chunk-FMBD7UC4-7zas8pDp.js → chunk-FMBD7UC4-DVzxIsSE.js} +1 -1
- package/dist/rcs-web/assets/{chunk-ND2GUHAM-PUXucyY6.js → chunk-ND2GUHAM-C6_oEhLf.js} +1 -1
- package/dist/rcs-web/assets/{chunk-QZHKN3VN-M3U5l4yW.js → chunk-QZHKN3VN-COvH7k5r.js} +1 -1
- package/dist/rcs-web/assets/classDiagram-4FO5ZUOK-DzNdVs3v.js +1 -0
- package/dist/rcs-web/assets/classDiagram-v2-Q7XG4LA2-DzNdVs3v.js +1 -0
- package/dist/rcs-web/assets/{code-block-IT6T5CEO-BgUazuuS.js → code-block-IT6T5CEO-CE-2f_-K.js} +1 -1
- package/dist/rcs-web/assets/{copy-DjaSB1Rw.js → copy-9pzb1Po6.js} +1 -1
- package/dist/rcs-web/assets/{cose-bilkent-S5V4N54A-zPupX74N.js → cose-bilkent-S5V4N54A-B9sMDFRe.js} +1 -1
- package/dist/rcs-web/assets/{dagre-BM42HDAG-B_EJ050J.js → dagre-BM42HDAG-DB1jXylM.js} +1 -1
- package/dist/rcs-web/assets/{diagram-2AECGRRQ-dnnxPH7w.js → diagram-2AECGRRQ-MNuqSRmg.js} +1 -1
- package/dist/rcs-web/assets/{diagram-5GNKFQAL-CLEOqCLZ.js → diagram-5GNKFQAL-BZwhvaEY.js} +1 -1
- package/dist/rcs-web/assets/{diagram-KO2AKTUF-DKBGpiRW.js → diagram-KO2AKTUF-3Wp2PnI2.js} +1 -1
- package/dist/rcs-web/assets/{diagram-LMA3HP47-BAilhXiA.js → diagram-LMA3HP47-CTcV1SBj.js} +1 -1
- package/dist/rcs-web/assets/{diagram-OG6HWLK6-C3CdmOxC.js → diagram-OG6HWLK6-DzXhSQDC.js} +1 -1
- package/dist/rcs-web/assets/{erDiagram-TEJ5UH35-D1yv-3Jv.js → erDiagram-TEJ5UH35-CwSihkB8.js} +1 -1
- package/dist/rcs-web/assets/{flowDiagram-I6XJVG4X-DpW11XWj.js → flowDiagram-I6XJVG4X-BSuXctT4.js} +1 -1
- package/{packages/remote-control-server/web/dist/assets/ganttDiagram-6RSMTGT7-CWr8suZm.js → dist/rcs-web/assets/ganttDiagram-6RSMTGT7-B87oxjmY.js} +1 -1
- package/dist/rcs-web/assets/{gitGraphDiagram-PVQCEYII-BspxLSNV.js → gitGraphDiagram-PVQCEYII-BRrwOi3C.js} +1 -1
- package/dist/rcs-web/assets/{infoDiagram-5YYISTIA-Bow20s-Q.js → infoDiagram-5YYISTIA-B-8QXS0n.js} +1 -1
- package/dist/rcs-web/assets/{ishikawaDiagram-YF4QCWOH-BESvGYGI.js → ishikawaDiagram-YF4QCWOH-Bau9MU6C.js} +1 -1
- package/dist/rcs-web/assets/{journeyDiagram-JHISSGLW-DZ6gzC7H.js → journeyDiagram-JHISSGLW-D_tAp--R.js} +1 -1
- package/dist/rcs-web/assets/{kanban-definition-UN3LZRKU-DIQo2GiM.js → kanban-definition-UN3LZRKU---UIvjMZ.js} +1 -1
- package/dist/rcs-web/assets/{linear-CdXALiZ8.js → linear-CIDLjd5h.js} +1 -1
- package/dist/rcs-web/assets/{main-CwLwGVDc.js → main-N3GYCdLF.js} +3 -3
- package/dist/rcs-web/assets/{mermaid-VLURNSYL-C0ZKM74W.js → mermaid-VLURNSYL-Cu5A5sMk.js} +4 -4
- package/dist/rcs-web/assets/{mermaid.core-eEtoQhrQ.js → mermaid.core-CEJOtCGw.js} +5 -5
- package/dist/rcs-web/assets/{mindmap-definition-RKZ34NQL-CcW3H_cH.js → mindmap-definition-RKZ34NQL-ldyccyCP.js} +1 -1
- package/dist/rcs-web/assets/{pieDiagram-4H26LBE5-DpXUpJMl.js → pieDiagram-4H26LBE5-CmghofeF.js} +1 -1
- package/{packages/remote-control-server/web/dist/assets/quadrantDiagram-W4KKPZXB-DOwMRzzP.js → dist/rcs-web/assets/quadrantDiagram-W4KKPZXB-B-2N2UHr.js} +1 -1
- package/dist/rcs-web/assets/{requirementDiagram-4Y6WPE33-CBi_6NcW.js → requirementDiagram-4Y6WPE33-39jlO9Y8.js} +1 -1
- package/{packages/remote-control-server/web/dist/assets/sankeyDiagram-5OEKKPKP-CKbAoTHm.js → dist/rcs-web/assets/sankeyDiagram-5OEKKPKP-DdY7KNFB.js} +1 -1
- package/dist/rcs-web/assets/{sequenceDiagram-3UESZ5HK-a3rYCe-w.js → sequenceDiagram-3UESZ5HK-D2k5rX6x.js} +1 -1
- package/dist/rcs-web/assets/{stateDiagram-AJRCARHV-B6R_Dt84.js → stateDiagram-AJRCARHV-CP9N457o.js} +1 -1
- package/dist/rcs-web/assets/{stateDiagram-v2-BHNVJYJU-Cq935fvz.js → stateDiagram-v2-BHNVJYJU-CPhZYlL0.js} +1 -1
- package/{packages/remote-control-server/web/dist/assets/timeline-definition-PNZ67QCA-8DXPKq1k.js → dist/rcs-web/assets/timeline-definition-PNZ67QCA-DSEPBO8O.js} +1 -1
- package/dist/rcs-web/assets/{vennDiagram-CIIHVFJN-BfDEkku5.js → vennDiagram-CIIHVFJN-CkNMwCJ3.js} +1 -1
- package/dist/rcs-web/assets/{wardleyDiagram-YWT4CUSO-Dvp2XZVf.js → wardleyDiagram-YWT4CUSO-Cxd-F60s.js} +1 -1
- package/{packages/remote-control-server/web/dist/assets/xychartDiagram-2RQKCTM6-DiPjQLUx.js → dist/rcs-web/assets/xychartDiagram-2RQKCTM6-BLL105NN.js} +1 -1
- package/dist/rcs-web/index.html +1 -1
- package/package.json +1 -1
- package/packages/remote-control-server/src/__tests__/attach-code.test.ts +183 -0
- package/packages/remote-control-server/src/__tests__/attach-wait.test.ts +213 -0
- package/packages/remote-control-server/src/__tests__/attach.test.ts +521 -0
- package/packages/remote-control-server/src/__tests__/turn-end-status.test.ts +217 -1
- package/packages/remote-control-server/src/auth/bridge-auth.ts +76 -0
- package/packages/remote-control-server/src/db/rcs-schema.sql +2 -1
- package/packages/remote-control-server/src/db/sqlite.ts +1 -0
- package/packages/remote-control-server/src/routes/v1/environments.ts +48 -74
- package/packages/remote-control-server/src/routes/v1/sessions.ts +558 -4
- package/packages/remote-control-server/src/routes/v2/worker-events.ts +12 -1
- package/packages/remote-control-server/src/routes/web/control.ts +11 -2
- package/packages/remote-control-server/src/routes/web/sessions.ts +67 -0
- package/packages/remote-control-server/src/services/environment.ts +27 -0
- package/packages/remote-control-server/src/store.ts +107 -2
- package/packages/remote-control-server/src/transport/event-bus.ts +15 -0
- package/packages/remote-control-server/src/transport/ws-handler.ts +14 -1
- package/packages/remote-control-server/src/types/api.ts +2 -0
- package/packages/remote-control-server/web/dist/assets/{AdminPanel-Xlza8Stt.js → AdminPanel-CqP_94xa.js} +1 -1
- package/{dist/rcs-web/assets/Claim-BMWwu213.js → packages/remote-control-server/web/dist/assets/Claim-BvfARQ6Q.js} +1 -1
- package/{dist/rcs-web/assets/Dashboard-D5awDzM3.js → packages/remote-control-server/web/dist/assets/Dashboard-BDGi4XpN.js} +1 -1
- package/{dist/rcs-web/assets/Join-ok37ggfZ.js → packages/remote-control-server/web/dist/assets/Join-PPDYBhsJ.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{Login-5qo97rq-.js → Login-JprQIEpr.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{Register-D_UOG8ar.js → Register-cuGuAE83.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{SessionDetail-BbHrR4Qu.js → SessionDetail-D-xhkyLo.js} +5 -5
- package/packages/remote-control-server/web/dist/assets/{SessionVisibilityBadge-Dy4FwTzo.js → SessionVisibilityBadge-91WyR9K6.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{Setup-GnPeNyH9.js → Setup-Buwa9Y3M.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{ShareLanding-CUjQydLL.js → ShareLanding-DhwgJb6V.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{TeamCreate-Ck2fEoUW.js → TeamCreate-CaoinTSG.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{TeamDetail-De6EPND0.js → TeamDetail-D5ahen24.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{TeamList-C-0LJRxd.js → TeamList-qCuKKSH3.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{TeamSettings-BszOrXVW.js → TeamSettings-BaIwImrp.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{UserSearchInput-CyQWtLL-.js → UserSearchInput-BxcYR_HU.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{UserSettings-DgyYp-1y.js → UserSettings-zfGfcuWs.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{arc-BaOPt7k-.js → arc-DwAbF6eM.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{architectureDiagram-3BPJPVTR-SvIakXbT.js → architectureDiagram-3BPJPVTR-uMOwOwiN.js} +1 -1
- package/{dist/rcs-web/assets/blockDiagram-GPEHLZMM-CiDp9J7i.js → packages/remote-control-server/web/dist/assets/blockDiagram-GPEHLZMM-B5BqFTkP.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{c4Diagram-AAUBKEIU-D9wzA9ur.js → c4Diagram-AAUBKEIU-D6eienz2.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/channel-CCfqpGSl.js +1 -0
- package/packages/remote-control-server/web/dist/assets/{chunk-2J33WTMH-qfYueRAP.js → chunk-2J33WTMH-DqVxv8yW.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{chunk-4BX2VUAB-D1V_UCiK.js → chunk-4BX2VUAB-X5o4x8om.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{chunk-55IACEB6-C67QiGmo.js → chunk-55IACEB6-D7G25_Y5.js} +1 -1
- package/{dist/rcs-web/assets/chunk-727SXJPM-D2Wln4TT.js → packages/remote-control-server/web/dist/assets/chunk-727SXJPM-CoXI1FIy.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{chunk-AQP2D5EJ-03h8hZhw.js → chunk-AQP2D5EJ-C73Crhqe.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{chunk-FMBD7UC4-7zas8pDp.js → chunk-FMBD7UC4-DVzxIsSE.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{chunk-ND2GUHAM-PUXucyY6.js → chunk-ND2GUHAM-C6_oEhLf.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{chunk-QZHKN3VN-M3U5l4yW.js → chunk-QZHKN3VN-COvH7k5r.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/classDiagram-4FO5ZUOK-DzNdVs3v.js +1 -0
- package/packages/remote-control-server/web/dist/assets/classDiagram-v2-Q7XG4LA2-DzNdVs3v.js +1 -0
- package/packages/remote-control-server/web/dist/assets/{code-block-IT6T5CEO-BgUazuuS.js → code-block-IT6T5CEO-CE-2f_-K.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{copy-DjaSB1Rw.js → copy-9pzb1Po6.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{cose-bilkent-S5V4N54A-zPupX74N.js → cose-bilkent-S5V4N54A-B9sMDFRe.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{dagre-BM42HDAG-B_EJ050J.js → dagre-BM42HDAG-DB1jXylM.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{diagram-2AECGRRQ-dnnxPH7w.js → diagram-2AECGRRQ-MNuqSRmg.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{diagram-5GNKFQAL-CLEOqCLZ.js → diagram-5GNKFQAL-BZwhvaEY.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{diagram-KO2AKTUF-DKBGpiRW.js → diagram-KO2AKTUF-3Wp2PnI2.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{diagram-LMA3HP47-BAilhXiA.js → diagram-LMA3HP47-CTcV1SBj.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{diagram-OG6HWLK6-C3CdmOxC.js → diagram-OG6HWLK6-DzXhSQDC.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{erDiagram-TEJ5UH35-D1yv-3Jv.js → erDiagram-TEJ5UH35-CwSihkB8.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{flowDiagram-I6XJVG4X-DpW11XWj.js → flowDiagram-I6XJVG4X-BSuXctT4.js} +1 -1
- package/{dist/rcs-web/assets/ganttDiagram-6RSMTGT7-CWr8suZm.js → packages/remote-control-server/web/dist/assets/ganttDiagram-6RSMTGT7-B87oxjmY.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{gitGraphDiagram-PVQCEYII-BspxLSNV.js → gitGraphDiagram-PVQCEYII-BRrwOi3C.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{infoDiagram-5YYISTIA-Bow20s-Q.js → infoDiagram-5YYISTIA-B-8QXS0n.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{ishikawaDiagram-YF4QCWOH-BESvGYGI.js → ishikawaDiagram-YF4QCWOH-Bau9MU6C.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{journeyDiagram-JHISSGLW-DZ6gzC7H.js → journeyDiagram-JHISSGLW-D_tAp--R.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{kanban-definition-UN3LZRKU-DIQo2GiM.js → kanban-definition-UN3LZRKU---UIvjMZ.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{linear-CdXALiZ8.js → linear-CIDLjd5h.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{main-CwLwGVDc.js → main-N3GYCdLF.js} +3 -3
- package/packages/remote-control-server/web/dist/assets/{mermaid-VLURNSYL-C0ZKM74W.js → mermaid-VLURNSYL-Cu5A5sMk.js} +4 -4
- package/packages/remote-control-server/web/dist/assets/{mermaid.core-eEtoQhrQ.js → mermaid.core-CEJOtCGw.js} +5 -5
- package/packages/remote-control-server/web/dist/assets/{mindmap-definition-RKZ34NQL-CcW3H_cH.js → mindmap-definition-RKZ34NQL-ldyccyCP.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{pieDiagram-4H26LBE5-DpXUpJMl.js → pieDiagram-4H26LBE5-CmghofeF.js} +1 -1
- package/{dist/rcs-web/assets/quadrantDiagram-W4KKPZXB-DOwMRzzP.js → packages/remote-control-server/web/dist/assets/quadrantDiagram-W4KKPZXB-B-2N2UHr.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{requirementDiagram-4Y6WPE33-CBi_6NcW.js → requirementDiagram-4Y6WPE33-39jlO9Y8.js} +1 -1
- package/{dist/rcs-web/assets/sankeyDiagram-5OEKKPKP-CKbAoTHm.js → packages/remote-control-server/web/dist/assets/sankeyDiagram-5OEKKPKP-DdY7KNFB.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{sequenceDiagram-3UESZ5HK-a3rYCe-w.js → sequenceDiagram-3UESZ5HK-D2k5rX6x.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{stateDiagram-AJRCARHV-B6R_Dt84.js → stateDiagram-AJRCARHV-CP9N457o.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{stateDiagram-v2-BHNVJYJU-Cq935fvz.js → stateDiagram-v2-BHNVJYJU-CPhZYlL0.js} +1 -1
- package/{dist/rcs-web/assets/timeline-definition-PNZ67QCA-8DXPKq1k.js → packages/remote-control-server/web/dist/assets/timeline-definition-PNZ67QCA-DSEPBO8O.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{vennDiagram-CIIHVFJN-BfDEkku5.js → vennDiagram-CIIHVFJN-CkNMwCJ3.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{wardleyDiagram-YWT4CUSO-Dvp2XZVf.js → wardleyDiagram-YWT4CUSO-Cxd-F60s.js} +1 -1
- package/{dist/rcs-web/assets/xychartDiagram-2RQKCTM6-DiPjQLUx.js → packages/remote-control-server/web/dist/assets/xychartDiagram-2RQKCTM6-BLL105NN.js} +1 -1
- package/packages/remote-control-server/web/dist/index.html +1 -1
- package/dist/rcs-web/assets/channel-CirgRB_G.js +0 -1
- package/dist/rcs-web/assets/classDiagram-4FO5ZUOK-Cq12UEz9.js +0 -1
- package/dist/rcs-web/assets/classDiagram-v2-Q7XG4LA2-Cq12UEz9.js +0 -1
- package/packages/remote-control-server/web/dist/assets/channel-CirgRB_G.js +0 -1
- package/packages/remote-control-server/web/dist/assets/classDiagram-4FO5ZUOK-Cq12UEz9.js +0 -1
- package/packages/remote-control-server/web/dist/assets/classDiagram-v2-Q7XG4LA2-Cq12UEz9.js +0 -1
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
storeGetEnvironment,
|
|
30
30
|
storeGetSessionWorker,
|
|
31
31
|
storeGetActiveWorkItemBySession,
|
|
32
|
+
storeIssueAttachCode,
|
|
32
33
|
storeListSessionsByEnvironment,
|
|
33
34
|
} from '../../store'
|
|
34
35
|
import { createWorkItem, stopWork } from '../../services/work-dispatch'
|
|
@@ -195,6 +196,72 @@ app.get('/sessions/all', sessionAuth, async c => {
|
|
|
195
196
|
return c.json(sessions, 200)
|
|
196
197
|
})
|
|
197
198
|
|
|
199
|
+
/** POST /web/sessions/:id/attach-code — Mint a one-time attach code (P3).
|
|
200
|
+
* The session manager shows/copies `slz rc --attach <code>`; the CLI
|
|
201
|
+
* redeems it via POST /v1/sessions/attach-code/exchange. The code IS the
|
|
202
|
+
* authorization (15-min TTL, single use) — the CLI needs no manage rights
|
|
203
|
+
* of its own. */
|
|
204
|
+
app.post('/sessions/:id/attach-code', sessionAuth, async c => {
|
|
205
|
+
const uuid = c.get('userId')!
|
|
206
|
+
const sessionId = resolveOwnedWebSessionId(c.req.param('id')!, uuid)
|
|
207
|
+
if (!sessionId) {
|
|
208
|
+
return c.json(
|
|
209
|
+
{ error: { type: 'forbidden', message: 'Not your session' } },
|
|
210
|
+
403,
|
|
211
|
+
)
|
|
212
|
+
}
|
|
213
|
+
if (!canManageSession(sessionId, uuid, getDb())) {
|
|
214
|
+
return c.json(
|
|
215
|
+
{
|
|
216
|
+
error: {
|
|
217
|
+
type: 'forbidden',
|
|
218
|
+
message: 'Only session owner or team admin can mint attach codes',
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
403,
|
|
222
|
+
)
|
|
223
|
+
}
|
|
224
|
+
const session = getSession(sessionId)
|
|
225
|
+
if (!session) {
|
|
226
|
+
return c.json(
|
|
227
|
+
{ error: { type: 'not_found', message: 'Session not found' } },
|
|
228
|
+
404,
|
|
229
|
+
)
|
|
230
|
+
}
|
|
231
|
+
if (isSessionClosedStatus(session.status)) {
|
|
232
|
+
return c.json(
|
|
233
|
+
{
|
|
234
|
+
error: {
|
|
235
|
+
type: 'session_closed',
|
|
236
|
+
message: `Session is ${session.status}`,
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
409,
|
|
240
|
+
)
|
|
241
|
+
}
|
|
242
|
+
if (session.source === 'acp') {
|
|
243
|
+
return c.json(
|
|
244
|
+
{
|
|
245
|
+
error: {
|
|
246
|
+
type: 'acp_session',
|
|
247
|
+
message: 'ACP sessions cannot be attached to a bridge worker',
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
409,
|
|
251
|
+
)
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
const record = storeIssueAttachCode(sessionId)
|
|
255
|
+
return c.json(
|
|
256
|
+
{
|
|
257
|
+
code: record.code,
|
|
258
|
+
expires_at: record.expiresAt.getTime(),
|
|
259
|
+
attach_command: `slz rc --attach ${record.code}`,
|
|
260
|
+
},
|
|
261
|
+
201,
|
|
262
|
+
)
|
|
263
|
+
})
|
|
264
|
+
|
|
198
265
|
/** GET /web/sessions/:id — Session detail */
|
|
199
266
|
app.get('/sessions/:id', sessionAuth, async c => {
|
|
200
267
|
const uuid = c.get('userId')!
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { config } from '../config'
|
|
2
|
+
import { log } from '../logger'
|
|
2
3
|
import {
|
|
3
4
|
storeCreateEnvironment,
|
|
4
5
|
storeCreateSession,
|
|
@@ -14,7 +15,10 @@ import {
|
|
|
14
15
|
storeClaimEnvironment,
|
|
15
16
|
storeSetEnvironmentClaim,
|
|
16
17
|
storeBindEnvSessionsToUser,
|
|
18
|
+
storeListWorkItems,
|
|
19
|
+
storeUpdateWorkItem,
|
|
17
20
|
} from '../store'
|
|
21
|
+
import { isSessionClosedStatus } from './session'
|
|
18
22
|
import type {
|
|
19
23
|
RegisterEnvironmentRequest,
|
|
20
24
|
EnvironmentResponse,
|
|
@@ -42,6 +46,11 @@ function toResponse(
|
|
|
42
46
|
team_id: row.teamId ?? null,
|
|
43
47
|
team_name: row.teamName ?? null,
|
|
44
48
|
owner_user_id: row.ownerUserId ?? null,
|
|
49
|
+
attach_waiting:
|
|
50
|
+
row.sessionMode === 'attach' &&
|
|
51
|
+
!storeListSessionsByEnvironment(row.id).some(
|
|
52
|
+
s => !isSessionClosedStatus(s.status),
|
|
53
|
+
),
|
|
45
54
|
}
|
|
46
55
|
}
|
|
47
56
|
|
|
@@ -64,10 +73,13 @@ export function registerEnvironment(
|
|
|
64
73
|
teamId?: string | null
|
|
65
74
|
claimToken?: string | null
|
|
66
75
|
claimExpiresAt?: Date | null
|
|
76
|
+
session_mode?: string | null
|
|
67
77
|
},
|
|
68
78
|
): RegisterEnvironmentResult {
|
|
69
79
|
const secret = config.apiKeys[0] || ''
|
|
70
80
|
const workerType = req.worker_type || req.metadata?.worker_type
|
|
81
|
+
// Session Attach wait mode: only 'attach' is meaningful today.
|
|
82
|
+
const sessionMode = req.session_mode === 'attach' ? 'attach' : null
|
|
71
83
|
|
|
72
84
|
// Idempotent re-registration: the CLI echoes back a backend-issued
|
|
73
85
|
// environment_id on restart (bridge pointer / --session-id resume).
|
|
@@ -85,6 +97,7 @@ export function registerEnvironment(
|
|
|
85
97
|
machineName: req.machine_name,
|
|
86
98
|
maxSessions: req.max_sessions,
|
|
87
99
|
capabilities: req.capabilities ?? null,
|
|
100
|
+
sessionMode,
|
|
88
101
|
})
|
|
89
102
|
// Ownership is backfill-only: a restart must not reassign the env
|
|
90
103
|
// (the route layer already gated reattach on admin/owner/unowned).
|
|
@@ -201,6 +214,7 @@ export function registerEnvironment(
|
|
|
201
214
|
ownerUserId: req.ownerUserId,
|
|
202
215
|
claimToken: req.claimToken,
|
|
203
216
|
claimExpiresAt: req.claimExpiresAt,
|
|
217
|
+
sessionMode,
|
|
204
218
|
})
|
|
205
219
|
|
|
206
220
|
let sessionId: string | undefined
|
|
@@ -240,6 +254,19 @@ export function registerEnvironment(
|
|
|
240
254
|
|
|
241
255
|
export function deregisterEnvironment(envId: string) {
|
|
242
256
|
storeUpdateEnvironment(envId, { status: 'deregistered' })
|
|
257
|
+
// Complete the env's open work items. Without this, a clean CLI exit
|
|
258
|
+
// leaves the acked item behind and isSessionOccupied keeps reporting
|
|
259
|
+
// session_busy (the reclaim path only covers dispatched items on a LIVE
|
|
260
|
+
// env). kill -9 crashes skip this — the env-status check in
|
|
261
|
+
// isSessionOccupied is the recovery path for those.
|
|
262
|
+
for (const item of storeListWorkItems()) {
|
|
263
|
+
if (item.environmentId === envId && item.state !== 'completed') {
|
|
264
|
+
storeUpdateWorkItem(item.id, { state: 'completed' })
|
|
265
|
+
log(
|
|
266
|
+
`[RCS] Completed orphaned work item ${item.id} (session=${item.sessionId}) on deregistered env ${envId}`,
|
|
267
|
+
)
|
|
268
|
+
}
|
|
269
|
+
}
|
|
243
270
|
}
|
|
244
271
|
|
|
245
272
|
export function getEnvironment(envId: string) {
|
|
@@ -24,6 +24,14 @@ export interface EnvironmentRecord {
|
|
|
24
24
|
lastPollAt: Date | null
|
|
25
25
|
createdAt: Date
|
|
26
26
|
updatedAt: Date
|
|
27
|
+
/**
|
|
28
|
+
* Session Attach (P2): 'attach' marks a worker that registered in
|
|
29
|
+
* wait-for-assignment mode — it created no session and is polling for the
|
|
30
|
+
* Web UI to bind one. Surfaced as `attach_waiting` on GET /web/environments
|
|
31
|
+
* so the Web UI can enumerate "waiting CLIs" to bind sessions to. Null =
|
|
32
|
+
* default create-mode behavior.
|
|
33
|
+
*/
|
|
34
|
+
sessionMode?: string | null
|
|
27
35
|
}
|
|
28
36
|
|
|
29
37
|
export interface SessionRecord {
|
|
@@ -119,6 +127,7 @@ export function storeCreateEnvironment(req: {
|
|
|
119
127
|
ownerUserId?: string | null
|
|
120
128
|
claimToken?: string | null
|
|
121
129
|
claimExpiresAt?: Date | null
|
|
130
|
+
sessionMode?: string | null
|
|
122
131
|
}): EnvironmentRecord {
|
|
123
132
|
const id = `env_${randomUUID().replace(/-/g, '')}`
|
|
124
133
|
const now = new Date()
|
|
@@ -138,14 +147,15 @@ export function storeCreateEnvironment(req: {
|
|
|
138
147
|
lastPollAt: now,
|
|
139
148
|
createdAt: now,
|
|
140
149
|
updatedAt: now,
|
|
150
|
+
sessionMode: req.sessionMode ?? null,
|
|
141
151
|
}
|
|
142
152
|
environments.set(id, record)
|
|
143
153
|
try {
|
|
144
154
|
const db = getDb()
|
|
145
155
|
const secretHash = createHash('sha256').update(record.secret).digest('hex')
|
|
146
156
|
db.query(
|
|
147
|
-
`INSERT OR REPLACE INTO environments (id, secret_hash, machine_name, worker_type, status, last_poll_at, created_at, owner_user_id, claim_token, claim_expires_at)
|
|
148
|
-
VALUES ($id, $sh, $mn, $wt, $st, $lp, $ca, $ou, $ct, $ce)`,
|
|
157
|
+
`INSERT OR REPLACE INTO environments (id, secret_hash, machine_name, worker_type, status, last_poll_at, created_at, owner_user_id, claim_token, claim_expires_at, session_mode)
|
|
158
|
+
VALUES ($id, $sh, $mn, $wt, $st, $lp, $ca, $ou, $ct, $ce, $sm)`,
|
|
149
159
|
).run({
|
|
150
160
|
$id: id,
|
|
151
161
|
$sh: secretHash,
|
|
@@ -157,6 +167,7 @@ export function storeCreateEnvironment(req: {
|
|
|
157
167
|
$ou: req.ownerUserId ?? null,
|
|
158
168
|
$ct: req.claimToken ?? null,
|
|
159
169
|
$ce: req.claimExpiresAt?.toISOString() ?? null,
|
|
170
|
+
$sm: record.sessionMode ?? null,
|
|
160
171
|
})
|
|
161
172
|
} catch (err) {
|
|
162
173
|
console.error('[store] DB write failed in storeCreateEnvironment:', err)
|
|
@@ -181,6 +192,7 @@ export function storeUpdateEnvironment(
|
|
|
181
192
|
| 'machineName'
|
|
182
193
|
| 'maxSessions'
|
|
183
194
|
| 'bridgeId'
|
|
195
|
+
| 'sessionMode'
|
|
184
196
|
>
|
|
185
197
|
>,
|
|
186
198
|
): boolean {
|
|
@@ -204,6 +216,10 @@ export function storeUpdateEnvironment(
|
|
|
204
216
|
sets.push('machine_name = $machineName')
|
|
205
217
|
params.$machineName = patch.machineName
|
|
206
218
|
}
|
|
219
|
+
if (patch.sessionMode !== undefined) {
|
|
220
|
+
sets.push('session_mode = $sessionMode')
|
|
221
|
+
params.$sessionMode = patch.sessionMode
|
|
222
|
+
}
|
|
207
223
|
|
|
208
224
|
// bridgeId, maxSessions, capabilities, updatedAt are in-memory only —
|
|
209
225
|
// the environments table has no corresponding columns.
|
|
@@ -561,6 +577,43 @@ export function storeListSessionsByEnvironment(envId: string): SessionRecord[] {
|
|
|
561
577
|
return [...sessions.values()].filter(s => s.environmentId === envId)
|
|
562
578
|
}
|
|
563
579
|
|
|
580
|
+
/**
|
|
581
|
+
* Re-point a session to a different environment (Session Attach).
|
|
582
|
+
*
|
|
583
|
+
* Only mutates environment_id + updated_at — session_owners (user/team) are
|
|
584
|
+
* deliberately untouched: attach transfers *driving* of the session, never
|
|
585
|
+
* ownership. The sessions.environment_id column predates this function;
|
|
586
|
+
* storeUpdateSession's patch type intentionally excludes environment_id
|
|
587
|
+
* because ownership-binding flows must never re-point a session as a side
|
|
588
|
+
* effect. Attach is the one flow with an explicit re-bind contract.
|
|
589
|
+
*/
|
|
590
|
+
export function storeRebindSessionEnvironment(
|
|
591
|
+
sessionId: string,
|
|
592
|
+
environmentId: string,
|
|
593
|
+
): boolean {
|
|
594
|
+
const rec = sessions.get(sessionId)
|
|
595
|
+
if (!rec) return false
|
|
596
|
+
rec.environmentId = environmentId
|
|
597
|
+
rec.updatedAt = new Date()
|
|
598
|
+
try {
|
|
599
|
+
const db = getDb()
|
|
600
|
+
db.query(
|
|
601
|
+
'UPDATE sessions SET environment_id = $envId, updated_at = $ua WHERE id = $id',
|
|
602
|
+
).run({
|
|
603
|
+
$envId: environmentId,
|
|
604
|
+
$ua: rec.updatedAt.toISOString(),
|
|
605
|
+
$id: sessionId,
|
|
606
|
+
})
|
|
607
|
+
} catch (err) {
|
|
608
|
+
console.error(
|
|
609
|
+
'[store] DB write failed in storeRebindSessionEnvironment:',
|
|
610
|
+
err,
|
|
611
|
+
)
|
|
612
|
+
throw err
|
|
613
|
+
}
|
|
614
|
+
return true
|
|
615
|
+
}
|
|
616
|
+
|
|
564
617
|
export function storeDeleteSession(id: string): boolean {
|
|
565
618
|
sessionWorkers.delete(id)
|
|
566
619
|
const deleted = sessions.delete(id)
|
|
@@ -941,6 +994,57 @@ export function storeMarkAcpAgentOnline(id: string): boolean {
|
|
|
941
994
|
return true
|
|
942
995
|
}
|
|
943
996
|
|
|
997
|
+
// ---------- Session Attach codes ----------
|
|
998
|
+
|
|
999
|
+
export interface AttachCodeRecord {
|
|
1000
|
+
code: string
|
|
1001
|
+
sessionId: string
|
|
1002
|
+
expiresAt: Date
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
const attachCodes = new Map<string, AttachCodeRecord>()
|
|
1006
|
+
|
|
1007
|
+
/**
|
|
1008
|
+
* Issue a one-time, short-TTL attach code for a session (P3). The Web UI
|
|
1009
|
+
* session manager calls POST /web/sessions/:id/attach-code and hands the
|
|
1010
|
+
* code to a CLI operator (`/rc --attach atc_...`); the code is the attach
|
|
1011
|
+
* authorization — the CLI needs no manage rights of its own.
|
|
1012
|
+
*
|
|
1013
|
+
* In-memory only (no DB table): codes are single-use with a 15-minute TTL,
|
|
1014
|
+
* so losing them on a server restart is acceptable — the user just clicks
|
|
1015
|
+
* "copy attach code" again.
|
|
1016
|
+
*/
|
|
1017
|
+
export function storeIssueAttachCode(
|
|
1018
|
+
sessionId: string,
|
|
1019
|
+
ttlMs = 15 * 60 * 1000,
|
|
1020
|
+
): AttachCodeRecord {
|
|
1021
|
+
const code = `atc_${randomUUID().replace(/-/g, '')}`
|
|
1022
|
+
const record: AttachCodeRecord = {
|
|
1023
|
+
code,
|
|
1024
|
+
sessionId,
|
|
1025
|
+
expiresAt: new Date(Date.now() + ttlMs),
|
|
1026
|
+
}
|
|
1027
|
+
attachCodes.set(code, record)
|
|
1028
|
+
return record
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
/**
|
|
1032
|
+
* Consume an attach code: single-use — returns the record and deletes it.
|
|
1033
|
+
* Expired or unknown codes return null.
|
|
1034
|
+
*/
|
|
1035
|
+
export function storeConsumeAttachCode(code: string): AttachCodeRecord | null {
|
|
1036
|
+
const record = attachCodes.get(code)
|
|
1037
|
+
if (!record) return null
|
|
1038
|
+
attachCodes.delete(code)
|
|
1039
|
+
if (record.expiresAt.getTime() <= Date.now()) return null
|
|
1040
|
+
return record
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
/** Test helper — drop all attach codes. */
|
|
1044
|
+
export function storeResetAttachCodes() {
|
|
1045
|
+
attachCodes.clear()
|
|
1046
|
+
}
|
|
1047
|
+
|
|
944
1048
|
// ---------- Reset (for tests) ----------
|
|
945
1049
|
|
|
946
1050
|
export function storeReset() {
|
|
@@ -950,6 +1054,7 @@ export function storeReset() {
|
|
|
950
1054
|
sessions.clear()
|
|
951
1055
|
workItems.clear()
|
|
952
1056
|
sessionWorkers.clear()
|
|
1057
|
+
storeResetAttachCodes()
|
|
953
1058
|
try {
|
|
954
1059
|
const db = getDb()
|
|
955
1060
|
// Delete in FK-safe order: child tables before parent tables
|
|
@@ -40,6 +40,21 @@ export class EventBus {
|
|
|
40
40
|
* deleted (removeEventBus) and survives clearHistory().
|
|
41
41
|
*/
|
|
42
42
|
modelsStateSnapshot: Record<string, unknown> | null = null
|
|
43
|
+
/**
|
|
44
|
+
* Turn-signal for status derivation (ws-handler.ts / worker-events.ts /
|
|
45
|
+
* control.ts): `true` while a turn is in progress (set by user events),
|
|
46
|
+
* `false` once it ends (result / result_success / interrupt).
|
|
47
|
+
*
|
|
48
|
+
* The REPL bridge's write paths are not strictly ordered — the synthetic
|
|
49
|
+
* turn-end result can be POSTed BEFORE the final mirrored assistant
|
|
50
|
+
* message (transcript-mirror render race, flush-gate bypass). Deriving
|
|
51
|
+
* `running` from such a late assistant flips the session back to running
|
|
52
|
+
* AFTER the turn ended, so the web UI input stays engaged and every new
|
|
53
|
+
* message lands in the queue instead of being sent. `false` by default:
|
|
54
|
+
* an assistant arriving with no user signal in flight belongs to an
|
|
55
|
+
* already-ended turn.
|
|
56
|
+
*/
|
|
57
|
+
turnActive = false
|
|
43
58
|
|
|
44
59
|
subscribe(callback: Subscriber): () => void {
|
|
45
60
|
this.subscribers.add(callback)
|
|
@@ -342,13 +342,26 @@ export function ingestBridgeMessage(
|
|
|
342
342
|
// assistant → running (LLM streaming). Skip when the session isn't in the
|
|
343
343
|
// store (test fixtures) or status is already the target so streaming
|
|
344
344
|
// assistant chunks don't spam session_status events.
|
|
345
|
+
//
|
|
346
|
+
// Turn-signal accounting (EventBus.turnActive): the REPL bridge can POST
|
|
347
|
+
// the synthetic turn-end result BEFORE the final mirrored assistant
|
|
348
|
+
// message (transcript-mirror render race in useReplBridge / flush-gate
|
|
349
|
+
// bypass in replBridge.writeMessages). A late assistant must not flip
|
|
350
|
+
// the session back to running after the turn ended — the web UI input
|
|
351
|
+
// would re-engage and every new message would land in the queue.
|
|
352
|
+
const bus = getEventBus(sessionId)
|
|
353
|
+
if (eventType === 'user') {
|
|
354
|
+
bus.turnActive = true
|
|
355
|
+
} else if (eventType === 'result' || eventType === 'result_success') {
|
|
356
|
+
bus.turnActive = false
|
|
357
|
+
}
|
|
345
358
|
const session = getSession(sessionId)
|
|
346
359
|
const targetStatus =
|
|
347
360
|
eventType === 'result' || eventType === 'result_success'
|
|
348
361
|
? 'idle'
|
|
349
362
|
: eventType === 'control_request'
|
|
350
363
|
? 'requires_action'
|
|
351
|
-
: eventType === 'assistant'
|
|
364
|
+
: eventType === 'assistant' && bus.turnActive
|
|
352
365
|
? 'running'
|
|
353
366
|
: null
|
|
354
367
|
if (session && targetStatus && session.status !== targetStatus) {
|
|
@@ -142,6 +142,8 @@ export interface EnvironmentResponse {
|
|
|
142
142
|
team_id: string | null
|
|
143
143
|
team_name: string | null
|
|
144
144
|
owner_user_id: string | null
|
|
145
|
+
/** Session Attach wait mode: registered to be assigned a session, none bound yet. */
|
|
146
|
+
attach_waiting?: boolean
|
|
145
147
|
}
|
|
146
148
|
|
|
147
149
|
export interface ServerInfoResponse {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as d,j as e}from"./vendor-DE_-CLIE.js";import{ak as c,al as o,J as m,af as s,a8 as l,x as u}from"./main-
|
|
1
|
+
import{e as d,j as e}from"./vendor-DE_-CLIE.js";import{ak as c,al as o,J as m,af as s,a8 as l,x as u}from"./main-N3GYCdLF.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function j(){c();const[a,i]=d.useState([]),{myTeams:r,isLoading:x}=o(),n=d.useCallback(async()=>{try{const t=await m();i(t||[])}catch(t){console.error("Admin: failed to load sessions",t)}},[]);return d.useEffect(()=>{n()},[n]),e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsxs("div",{className:"mx-auto max-w-5xl px-4 py-8",children:[e.jsx("h1",{className:"mb-6 font-display text-2xl font-semibold text-text-primary",children:s("admin.title")}),e.jsxs("section",{className:"mb-10",children:[e.jsxs("h2",{className:"mb-4 font-display text-lg font-semibold text-text-primary",children:[s("admin.teams")," (",r.length,")"]}),x?e.jsx("div",{className:"rounded-xl border border-border bg-surface-1 p-4 text-center text-text-muted",children:s("common.loading")}):r.length===0?e.jsx("div",{className:"rounded-xl border border-border bg-surface-1 p-4 text-center text-text-muted",children:s("admin.noTeams")}):e.jsx("div",{className:"space-y-2",children:r.map(t=>e.jsxs("a",{href:`/teams/${t.slug}`,className:"flex items-center justify-between rounded-xl border border-border bg-surface-1 px-4 py-3 no-underline transition-colors hover:border-border-light hover:bg-surface-2",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("span",{className:"font-medium text-text-primary",children:t.name}),e.jsx("span",{className:"ml-2 text-xs text-text-muted",children:t.slug})]}),e.jsx("span",{className:"text-xs text-text-muted",children:l(new Date(t.created_at).getTime()/1e3)})]},t.id))})]}),e.jsxs("section",{children:[e.jsxs("h2",{className:"mb-4 font-display text-lg font-semibold text-text-primary",children:[s("admin.sessions")," (",a.length,")"]}),a.length===0?e.jsx("div",{className:"rounded-xl border border-border bg-surface-1 p-4 text-center text-text-muted",children:s("admin.noSessions")}):e.jsx("div",{className:"space-y-2",children:a.map(t=>e.jsxs("a",{href:`/code/${t.id}`,className:"flex items-center justify-between rounded-xl border border-border bg-surface-1 px-4 py-3 no-underline transition-colors hover:border-border-light hover:bg-surface-2",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"truncate font-medium text-text-primary",children:t.title||t.id}),e.jsx("span",{className:"rounded-full bg-surface-2 px-2 py-0.5 text-xs text-text-muted",children:t.source||"unknown"})]}),e.jsx("div",{className:"truncate text-xs text-text-muted",children:t.id})]}),e.jsxs("div",{className:"ml-4 flex items-center gap-3",children:[e.jsx(u,{status:t.status}),e.jsx("span",{className:"text-xs text-text-muted",children:l(t.updated_at||t.created_at)})]})]},t.id))})]})]})})}export{j as AdminPanel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{E as u,J as f}from"./main-
|
|
1
|
+
import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{E as u,J as f}from"./main-N3GYCdLF.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";const v=2e3,N=3e4;function E(){const c=window.location.pathname.split("/"),i=c[c.length-1]||"",[s,n]=r.useState("idle"),[m,l]=r.useState(null),[a,d]=r.useState(null);return r.useEffect(()=>{if(!i||!i.startsWith("clm_")){l("Invalid claim token"),n("error");return}n("claiming"),u(i).then(t=>{d(t.environment_id),n("waiting")}).catch(t=>{l(t instanceof Error?t.message:"Claim failed"),n("error")})},[i]),r.useEffect(()=>{if(s!=="waiting"||!a)return;let t=!1;const x=Date.now(),o=setInterval(()=>{if(Date.now()-x>N){clearInterval(o),t||n("timeout");return}f().then(h=>{t||(h||[]).some(p=>p.environment_id===a)&&(clearInterval(o),window.location.href="/code/")}).catch(()=>{})},v);return()=>{t=!0,clearInterval(o)}},[s,a]),s==="claiming"?e.jsx("div",{className:"px-6 py-16 sm:px-10 sm:py-20",children:e.jsx("p",{className:"text-sm text-text-muted",children:"Claiming environment..."})}):s==="error"?e.jsxs("div",{className:"px-6 py-16 sm:px-10 sm:py-20",children:[e.jsx("p",{className:"text-sm text-destructive",children:m}),e.jsx("a",{href:"/code",className:"mt-4 inline-block text-accent hover:underline",children:"Back to dashboard"})]}):s==="waiting"||s==="timeout"?e.jsxs("div",{className:"px-6 py-16 sm:px-10 sm:py-20",children:[e.jsxs("header",{className:"mb-10",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold tracking-tight text-text-primary",children:"Environment claimed"}),e.jsx("p",{className:"mt-2 text-sm text-text-muted",children:"You are now the owner of this environment."})]}),e.jsxs("div",{className:"space-y-4",children:[a&&e.jsx("p",{className:"font-mono text-xs text-text-muted",children:a}),s==="waiting"?e.jsxs("p",{className:"text-sm text-text-muted",children:["Waiting for the worker to create a session",e.jsx("span",{className:"animate-pulse",children:"…"})]}):e.jsx("p",{className:"text-sm text-text-muted",children:"The worker has not created a session yet — it may be offline or stopped. The session will appear on the dashboard once the worker connects."}),e.jsx("a",{href:"/code",className:"inline-block rounded-md bg-accent px-4 py-2 text-sm font-medium text-white hover:bg-accent/90 transition-colors",children:"Go to dashboard"})]})]}):e.jsx("div",{className:"px-6 py-16 sm:px-10 sm:py-20",children:e.jsx("p",{className:"text-sm text-text-muted",children:"Claiming environment..."})})}export{E as Claim};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,e as o}from"./vendor-DE_-CLIE.js";import{a5 as O,a4 as _,al as E,aj as T,x as F,ak as L,af as a,a8 as A,q as $,s as W,e as H,r as V,d as P,ab as q,G,J,K,I as R}from"./main-
|
|
1
|
+
import{j as e,e as o}from"./vendor-DE_-CLIE.js";import{a5 as O,a4 as _,al as E,aj as T,x as F,ak as L,af as a,a8 as A,q as $,s as W,e as H,r as V,d as P,ab as q,G,J,K,I as R}from"./main-N3GYCdLF.js";import{g as D}from"./workerType-Bd-zteMi.js";import{S as U,D as Z,a as z,c as Q,d as X,b as Y}from"./SessionVisibilityBadge-91WyR9K6.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";/**
|
|
2
2
|
* @license lucide-react v0.555.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{aj as v,af as t}from"./main-
|
|
1
|
+
import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{aj as v,af as t}from"./main-N3GYCdLF.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function E({onSuccess:b,onInvalidInvite:l}){const{join:f}=v(),[u,h]=r.useState(""),[d,j]=r.useState(""),[o,w]=r.useState(""),[c,g]=r.useState(""),[m,n]=r.useState(""),[x,p]=r.useState(!1);r.useEffect(()=>{const a=new URLSearchParams(window.location.search).get("invite");a?h(a):l()},[l]);const y=async s=>{if(s.preventDefault(),n(""),o.length<8){n(t("auth.setup.passwordTooShort"));return}if(o!==c){n(t("auth.setup.passwordMismatch"));return}p(!0);try{await f(u,d,o),b()}catch(a){const i=a instanceof Error?a.message:"Join failed";if(i.includes("Invalid invitation")||i.includes("expired")||i.includes("already used")){l();return}n(i)}finally{p(!1)}};return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-surface-0 px-4",children:e.jsxs("div",{className:"w-full max-w-sm space-y-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold text-text-primary",children:t("auth.join.title")}),e.jsx("p",{className:"mt-2 text-sm text-text-muted",children:t("auth.join.welcome")}),e.jsx("p",{className:"mt-1 text-sm text-text-muted",children:t("auth.join.description")})]}),e.jsxs("form",{onSubmit:y,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.join.username")}),e.jsx("input",{type:"text",value:d,onChange:s=>j(s.target.value),required:!0,autoComplete:"username",autoFocus:!0,className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.join.password")}),e.jsx("input",{type:"password",value:o,onChange:s=>w(s.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.join.confirmPassword")}),e.jsx("input",{type:"password",value:c,onChange:s=>g(s.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),m&&e.jsx("p",{className:"text-sm text-status-error",children:m}),e.jsx("button",{type:"submit",disabled:x||!u,className:"w-full rounded-lg bg-brand px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-brand-light disabled:cursor-not-allowed disabled:opacity-50",children:x?t("common.loading"):t("auth.join.submit")})]})]})})}export{E as Join};
|
package/packages/remote-control-server/web/dist/assets/{Login-5qo97rq-.js → Login-JprQIEpr.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{aj as f,af as t}from"./main-
|
|
1
|
+
import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{aj as f,af as t}from"./main-N3GYCdLF.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function N({onSuccess:d,onNavigateRegister:c}){const{login:m,registrationAllowed:x}=f(),[a,p]=r.useState(""),[o,b]=r.useState(""),[l,n]=r.useState(""),[i,u]=r.useState(!1),h=async s=>{s.preventDefault(),n(""),u(!0);try{await m(a,o),d()}catch{n(t("auth.login.failed"))}finally{u(!1)}};return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-surface-0 px-4",children:e.jsxs("div",{className:"w-full max-w-sm space-y-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold text-text-primary",children:t("auth.login.title")}),e.jsx("p",{className:"mt-2 text-sm text-text-muted",children:t("auth.login.description")})]}),e.jsxs("form",{onSubmit:h,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.login.username")}),e.jsx("input",{type:"text",value:a,onChange:s=>p(s.target.value),required:!0,autoComplete:"username",autoFocus:!0,className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.login.password")}),e.jsx("input",{type:"password",value:o,onChange:s=>b(s.target.value),required:!0,autoComplete:"current-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),l&&e.jsx("p",{className:"text-sm text-status-error",children:l}),e.jsx("button",{type:"submit",disabled:i,className:"w-full rounded-lg bg-brand px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-brand-light disabled:cursor-not-allowed disabled:opacity-50",children:i?t("common.loading"):t("auth.login.submit")})]}),x&&e.jsx("button",{type:"button",onClick:c,className:"w-full text-center text-sm text-text-muted hover:text-text-primary transition-colors",children:t("auth.login.register")})]})})}export{N as Login};
|
package/packages/remote-control-server/web/dist/assets/{Register-D_UOG8ar.js → Register-cuGuAE83.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{aj as y,af as t}from"./main-
|
|
1
|
+
import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{aj as y,af as t}from"./main-N3GYCdLF.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function S({onSuccess:m,onBack:x}){const{register:p}=y(),[n,b]=r.useState(""),[a,h]=r.useState(""),[l,f]=r.useState(""),[i,o]=r.useState(""),[u,d]=r.useState(!1),g=async s=>{if(s.preventDefault(),o(""),a.length<8){o(t("auth.setup.passwordTooShort"));return}if(a!==l){o(t("auth.setup.passwordMismatch"));return}d(!0);try{await p(n,a),m()}catch(c){o(c instanceof Error?c.message:t("auth.register.failed"))}finally{d(!1)}};return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-surface-0 px-4",children:e.jsxs("div",{className:"w-full max-w-sm space-y-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold text-text-primary",children:t("auth.register.title")}),e.jsx("p",{className:"mt-2 text-sm text-text-muted",children:t("auth.register.description")})]}),e.jsxs("form",{onSubmit:g,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.login.username")}),e.jsx("input",{type:"text",value:n,onChange:s=>b(s.target.value),required:!0,autoComplete:"username",autoFocus:!0,className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.login.password")}),e.jsx("input",{type:"password",value:a,onChange:s=>h(s.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.join.confirmPassword")}),e.jsx("input",{type:"password",value:l,onChange:s=>f(s.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),i&&e.jsx("p",{className:"text-sm text-status-error",children:i}),e.jsx("button",{type:"submit",disabled:u,className:"w-full rounded-lg bg-brand px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-brand-light disabled:cursor-not-allowed disabled:opacity-50",children:u?t("common.loading"):t("auth.register.submit")})]}),e.jsx("button",{type:"button",onClick:x,className:"w-full text-center text-sm text-text-muted hover:text-text-primary transition-colors",children:t("auth.register.backToLogin")})]})})}export{S as Register};
|