@recombine-ai/platform 0.3.0 → 0.5.0-test.0
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/README.md +2 -1
- package/build/agent/agent-analytics.d.ts +14 -0
- package/build/agent/agent-analytics.d.ts.map +1 -0
- package/build/agent/agent-analytics.js +29 -0
- package/build/agent/index.d.ts +1 -0
- package/build/agent/index.d.ts.map +1 -1
- package/build/agent/text-agent.d.ts +4 -3
- package/build/agent/text-agent.d.ts.map +1 -1
- package/build/agent/text-agent.js +8 -1
- package/build/agent/voice-agent.d.ts +4 -3
- package/build/agent/voice-agent.d.ts.map +1 -1
- package/build/agent/voice-agent.js +8 -1
- package/build/analytics/analytics.d.ts +49 -0
- package/build/analytics/analytics.d.ts.map +1 -0
- package/build/analytics/analytics.js +223 -0
- package/build/analytics/index.d.ts +7 -0
- package/build/analytics/index.d.ts.map +1 -0
- package/build/analytics/index.js +3 -0
- package/build/analytics/postgres-analytics-query.d.ts +117 -0
- package/build/analytics/postgres-analytics-query.d.ts.map +1 -0
- package/build/analytics/postgres-analytics-query.js +504 -0
- package/build/analytics/postgres-analytics.d.ts +33 -0
- package/build/analytics/postgres-analytics.d.ts.map +1 -0
- package/build/analytics/postgres-analytics.js +310 -0
- package/build/bosun/std-mocks/platform.d.ts.map +1 -1
- package/build/bosun/std-mocks/platform.js +2 -0
- package/build/bosun/test-agent.d.ts.map +1 -1
- package/build/bosun/test-agent.js +2 -1
- package/build/bosun-app/frontend/client/_app/immutable/assets/0.BhaOIA8N.css +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/assets/0.BhaOIA8N.css.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/assets/0.BhaOIA8N.css.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/-ZTJLlC3.js +2 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/-ZTJLlC3.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/-ZTJLlC3.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/0Q6TVg1G.js +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/0Q6TVg1G.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/0Q6TVg1G.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{DEz15oJb.js → 4OgEIyh1.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/4OgEIyh1.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/4OgEIyh1.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/8bHWYDyT.js +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/8bHWYDyT.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/8bHWYDyT.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{C0rPkxmP.js → 9pOOTteE.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/9pOOTteE.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/9pOOTteE.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/AlWqjAqK.js +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/AlWqjAqK.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/AlWqjAqK.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{B9pMb6OP.js → B9e8MCJ2.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/B9e8MCJ2.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/B9e8MCJ2.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{BEdAvgYp.js → BDIIq0ko.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BDIIq0ko.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BDIIq0ko.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BFiP5U7M.js +3 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BFiP5U7M.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BFiP5U7M.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{DnMQeiTY.js → BHU9AXbn.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BHU9AXbn.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BHU9AXbn.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{Bp8N7Z1t.js → BHwgmBN2.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BHwgmBN2.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BHwgmBN2.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BOlSQbHE.js +2 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BOlSQbHE.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BOlSQbHE.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BXO2WwQx.js +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BXO2WwQx.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BXO2WwQx.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{BQIf5msi.js → BZeEhZ9x.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BZeEhZ9x.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BZeEhZ9x.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BbB1C_YH.js +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BbB1C_YH.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BbB1C_YH.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{DJnDF3d9.js → BtJ1grIE.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BtJ1grIE.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BtJ1grIE.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/C5z36vOP.js +8 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/C5z36vOP.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/C5z36vOP.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CHNsNZYZ.js +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CHNsNZYZ.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CHNsNZYZ.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{B8q_gCwD.js → CINamuM5.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CINamuM5.js.br +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CINamuM5.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CR6hF_YT.js +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CR6hF_YT.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CR6hF_YT.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CbXT0Qet.js +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CbXT0Qet.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CbXT0Qet.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{sKHuRf4Z.js → CkCJ1-zx.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CkCJ1-zx.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CkCJ1-zx.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/Cm25Ihk6.js +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/Cm25Ihk6.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/Cm25Ihk6.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CmJrlnQL.js +64 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CmJrlnQL.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CmJrlnQL.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CofRL0YY.js +2 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CofRL0YY.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CofRL0YY.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{joiJcRPz.js → Csai_DUZ.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/Csai_DUZ.js.br +6 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/Csai_DUZ.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{CCYriF4C.js → D24F_tet.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/D24F_tet.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/D24F_tet.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{DNvczHUR.js → D35JKLYq.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/D35JKLYq.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/D35JKLYq.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{BcbX6huO.js → D6r2pB3T.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/D6r2pB3T.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/D6r2pB3T.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{ClLUwVGq.js → DJFKRYxi.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DJFKRYxi.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DJFKRYxi.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{BW6P0Ecp.js → DOVgTfHj.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DOVgTfHj.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DOVgTfHj.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DPfKTQVx.js +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DPfKTQVx.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DPfKTQVx.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{ouMvMh56.js → DSFEfk-V.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DSFEfk-V.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DSFEfk-V.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DbY589nb.js +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DbY589nb.js.br +2 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DbY589nb.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DfEgi1lN.js +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DfEgi1lN.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DfEgi1lN.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{BJ9KKLWf.js → DsRUoWL6.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DsRUoWL6.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DsRUoWL6.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{DjujL8K1.js → FLx39vZ1.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/FLx39vZ1.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/FLx39vZ1.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{BBk8_Xpk.js → NwoUwoIi.js} +2 -2
- package/build/bosun-app/frontend/client/_app/immutable/chunks/NwoUwoIi.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/NwoUwoIi.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{C9yBjdYI.js → VLxbY_3V.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/VLxbY_3V.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/VLxbY_3V.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/uEzaTD9T.js +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/uEzaTD9T.js.br +2 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/uEzaTD9T.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/entry/app.fITODAfp.js +2 -0
- package/build/bosun-app/frontend/client/_app/immutable/entry/app.fITODAfp.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/entry/app.fITODAfp.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/entry/start.CuqUO5EQ.js +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/entry/start.CuqUO5EQ.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/entry/start.CuqUO5EQ.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/{0.CyFCeOko.js → 0.sWxZKx1V.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/nodes/0.sWxZKx1V.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/0.sWxZKx1V.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/1.PQXY4edq.js +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/1.PQXY4edq.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/1.PQXY4edq.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/{10.CQP8ZYdc.js → 10.BP2gctlm.js} +7 -7
- package/build/bosun-app/frontend/client/_app/immutable/nodes/10.BP2gctlm.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/10.BP2gctlm.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/{15.drIyAxl2.js → 15.D4h0JT65.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/nodes/15.D4h0JT65.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/15.D4h0JT65.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/17.D5wsHo5R.js +3 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/17.D5wsHo5R.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/17.D5wsHo5R.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/18.CZp-IBH8.js +11 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/18.CZp-IBH8.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/18.CZp-IBH8.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/{2.lZxPEqtw.js → 2.DaZm8LbH.js} +3 -3
- package/build/bosun-app/frontend/client/_app/immutable/nodes/2.DaZm8LbH.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/2.DaZm8LbH.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/3.Bk3buFqf.js +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/3.Bk3buFqf.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/3.Bk3buFqf.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/{4.B_swg0wq.js → 4.BWY-PEkr.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/nodes/4.BWY-PEkr.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/4.BWY-PEkr.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/{5.CJfS926N.js → 5.Cl70jzrZ.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/nodes/5.Cl70jzrZ.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/5.Cl70jzrZ.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/{6.4aRjHu4u.js → 6.Cfkc99si.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/nodes/6.Cfkc99si.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/6.Cfkc99si.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/{8.BZFIHe4g.js → 8.CmB3ZvKy.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/nodes/8.CmB3ZvKy.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/8.CmB3ZvKy.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/{9.BYJRzNt4.js → 9.8UAsXj0n.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/nodes/9.8UAsXj0n.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/9.8UAsXj0n.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/version.json +1 -1
- package/build/bosun-app/frontend/client/_app/version.json.br +0 -0
- package/build/bosun-app/frontend/client/_app/version.json.gz +0 -0
- package/build/bosun-app/frontend/handler.js +4 -4
- package/build/bosun-app/frontend/index.js +4 -4
- package/build/bosun-app/frontend/server/chunks/chunks/{internal.js-V8Wfo1-F.js → internal.js-BYUssiWE.js} +2 -2
- package/build/bosun-app/frontend/server/chunks/chunks/{internal.js-V8Wfo1-F.js.map → internal.js-BYUssiWE.js.map} +1 -1
- package/build/bosun-app/frontend/server/chunks/chunks/{schemas.js-W-DP3mDr.js → schemas.js-b9Mui_5N.js} +187 -2
- package/build/bosun-app/frontend/server/chunks/chunks/schemas.js-b9Mui_5N.js.map +1 -0
- package/build/bosun-app/frontend/server/chunks/chunks/{source-selection.js-Cc6RX6-m.js → source-selection.js-BpCr9ar-.js} +47 -4
- package/build/bosun-app/frontend/server/chunks/chunks/source-selection.js-BpCr9ar-.js.map +1 -0
- package/build/bosun-app/frontend/server/chunks/chunks/{sources.server.js-B6fpC51P.js → sources.server.js-DIj2VjCx.js} +2 -2
- package/build/bosun-app/frontend/server/chunks/chunks/{sources.server.js-B6fpC51P.js.map → sources.server.js-DIj2VjCx.js.map} +1 -1
- package/build/bosun-app/frontend/server/chunks/entries/endpoints/traces/api/latency/_conversationId_/{_server.ts.js-hHR2eFvt.js → _server.ts.js-mL82mAit.js} +2 -2
- package/build/bosun-app/frontend/server/chunks/entries/endpoints/traces/api/latency/_conversationId_/{_server.ts.js-hHR2eFvt.js.map → _server.ts.js-mL82mAit.js.map} +1 -1
- package/build/bosun-app/frontend/server/chunks/entries/endpoints/traces/api/proxy/_...path_/{_server.ts.js-CHrOiduq.js → _server.ts.js-DDDiZFhL.js} +17 -10
- package/build/bosun-app/frontend/server/chunks/entries/endpoints/traces/api/proxy/_...path_/_server.ts.js-DDDiZFhL.js.map +1 -0
- package/build/bosun-app/frontend/server/chunks/entries/endpoints/traces/api/sources/{_server.ts.js-C2FIU8Kr.js → _server.ts.js-D_UoR_Ph.js} +3 -3
- package/build/bosun-app/frontend/server/chunks/entries/endpoints/traces/api/sources/{_server.ts.js-C2FIU8Kr.js.map → _server.ts.js-D_UoR_Ph.js.map} +1 -1
- package/build/bosun-app/frontend/server/chunks/entries/pages/traces/conversations/_conversationId_/latency/{_page.svelte.js-tdUdTo4m.js → _page.svelte.js-DXMXSrkC.js} +5 -5
- package/build/bosun-app/frontend/server/chunks/entries/pages/traces/conversations/_conversationId_/latency/_page.svelte.js-DXMXSrkC.js.map +1 -0
- package/build/bosun-app/frontend/server/chunks/entries/pages/traces/conversations/_conversationId_/traces/{_page.svelte.js-Ca79DBzJ.js → _page.svelte.js-CZkbHRGl.js} +28 -9
- package/build/bosun-app/frontend/server/chunks/entries/pages/traces/conversations/_conversationId_/traces/_page.svelte.js-CZkbHRGl.js.map +1 -0
- package/build/bosun-app/frontend/server/chunks/entries/pages/traces/conversations/{_layout.svelte.js-Dvn3tfM7.js → _layout.svelte.js-B4Yws-GS.js} +328 -35
- package/build/bosun-app/frontend/server/chunks/entries/pages/traces/conversations/_layout.svelte.js-B4Yws-GS.js.map +1 -0
- package/build/bosun-app/frontend/server/chunks/{handler-I7zF-fv9.js → handler-B-UxYyko.js} +3 -3
- package/build/bosun-app/frontend/server/chunks/{handler-I7zF-fv9.js.map → handler-B-UxYyko.js.map} +1 -1
- package/build/bosun-app/frontend/server/chunks/{index.js-Ca0Ef2Tt.js → index.js-CleJzVFo.js} +2 -2
- package/build/bosun-app/frontend/server/chunks/{index.js-Ca0Ef2Tt.js.map → index.js-CleJzVFo.js.map} +1 -1
- package/build/bosun-app/frontend/server/chunks/{manifest.js-D22OChaf.js → manifest.js-C8NquSUu.js} +18 -18
- package/build/bosun-app/frontend/server/chunks/{manifest.js-D22OChaf.js.map → manifest.js-C8NquSUu.js.map} +1 -1
- package/build/bosun-app/frontend/server/chunks/nodes/0.js-BUVJh5Uv.js +9 -0
- package/build/bosun-app/frontend/server/chunks/nodes/0.js-BUVJh5Uv.js.map +1 -0
- package/build/bosun-app/frontend/server/chunks/nodes/1.js-BKMg62KW.js +9 -0
- package/build/bosun-app/frontend/server/chunks/nodes/{1.js-BesNpd2w.js.map → 1.js-BKMg62KW.js.map} +1 -1
- package/build/bosun-app/frontend/server/chunks/nodes/10.js-Bz0enUzA.js +9 -0
- package/build/bosun-app/frontend/server/chunks/nodes/10.js-Bz0enUzA.js.map +1 -0
- package/build/bosun-app/frontend/server/chunks/nodes/{15.js-cNd06B9T.js → 15.js-nE6nl5S8.js} +2 -2
- package/build/bosun-app/frontend/server/chunks/nodes/{15.js-cNd06B9T.js.map → 15.js-nE6nl5S8.js.map} +1 -1
- package/build/bosun-app/frontend/server/chunks/nodes/17.js-CplX6Ruz.js +9 -0
- package/build/bosun-app/frontend/server/chunks/nodes/17.js-CplX6Ruz.js.map +1 -0
- package/build/bosun-app/frontend/server/chunks/nodes/18.js-cGVVSoEn.js +9 -0
- package/build/bosun-app/frontend/server/chunks/nodes/18.js-cGVVSoEn.js.map +1 -0
- package/build/bosun-app/frontend/server/chunks/nodes/2.js-CliMdUrH.js +9 -0
- package/build/bosun-app/frontend/server/chunks/nodes/2.js-CliMdUrH.js.map +1 -0
- package/build/bosun-app/frontend/server/chunks/nodes/3.js-BQpmmrUv.js +9 -0
- package/build/bosun-app/frontend/server/chunks/nodes/3.js-BQpmmrUv.js.map +1 -0
- package/build/bosun-app/frontend/server/chunks/nodes/4.js-BgSyMW3D.js +9 -0
- package/build/bosun-app/frontend/server/chunks/nodes/4.js-BgSyMW3D.js.map +1 -0
- package/build/bosun-app/frontend/server/chunks/nodes/5.js-CqRWSoO5.js +9 -0
- package/build/bosun-app/frontend/server/chunks/nodes/{5.js-DNbqpjRZ.js.map → 5.js-CqRWSoO5.js.map} +1 -1
- package/build/bosun-app/frontend/server/chunks/nodes/6.js-CrEQ411L.js +9 -0
- package/build/bosun-app/frontend/server/chunks/nodes/6.js-CrEQ411L.js.map +1 -0
- package/build/bosun-app/frontend/server/chunks/nodes/8.js-CiOj2-c5.js +9 -0
- package/build/bosun-app/frontend/server/chunks/nodes/8.js-CiOj2-c5.js.map +1 -0
- package/build/bosun-app/frontend/server/chunks/nodes/9.js-BMwqRSfy.js +9 -0
- package/build/bosun-app/frontend/server/chunks/nodes/9.js-BMwqRSfy.js.map +1 -0
- package/build/build/build.d.ts +3 -0
- package/build/build/build.d.ts.map +1 -0
- package/build/build/build.js +73 -0
- package/build/build/cli.d.ts +2 -11
- package/build/build/cli.d.ts.map +1 -1
- package/build/build/cli.js +19 -81
- package/build/build/common.d.ts +6 -9
- package/build/build/common.d.ts.map +1 -1
- package/build/build/common.js +131 -40
- package/build/build/config.d.ts +9 -0
- package/build/build/config.d.ts.map +1 -0
- package/build/build/config.js +24 -0
- package/build/build/index.d.ts +4 -6
- package/build/build/index.d.ts.map +1 -1
- package/build/build/index.js +3 -3
- package/build/call-control/types.d.ts +1 -1
- package/build/call-control/types.d.ts.map +1 -1
- package/build/core/make-text-platform.d.ts +3 -1
- package/build/core/make-text-platform.d.ts.map +1 -1
- package/build/core/make-text-platform.js +3 -1
- package/build/core/make-voice-platform.d.ts +3 -1
- package/build/core/make-voice-platform.d.ts.map +1 -1
- package/build/core/make-voice-platform.js +3 -1
- package/build/core/platform.d.ts +2 -0
- package/build/core/platform.d.ts.map +1 -1
- package/build/voice-agent-api/call-end.d.ts +19 -0
- package/build/voice-agent-api/call-end.d.ts.map +1 -0
- package/build/voice-agent-api/call-end.js +58 -0
- package/build/voice-agent-api/voice-http.d.ts +3 -1
- package/build/voice-agent-api/voice-http.d.ts.map +1 -1
- package/build/voice-agent-api/voice-http.js +27 -7
- package/package.json +5 -1
- package/build/bosun-app/frontend/client/_app/immutable/assets/0.B5fEz2jr.css +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/assets/0.B5fEz2jr.css.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/assets/0.B5fEz2jr.css.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/9mOMnnWN.js +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/9mOMnnWN.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/9mOMnnWN.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/B0nqNj93.js +0 -2
- package/build/bosun-app/frontend/client/_app/immutable/chunks/B0nqNj93.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/B0nqNj93.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/B1dhmiqQ.js +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/B1dhmiqQ.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/B1dhmiqQ.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/B8q_gCwD.js.br +0 -2
- package/build/bosun-app/frontend/client/_app/immutable/chunks/B8q_gCwD.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/B9pMb6OP.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/B9pMb6OP.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BBk8_Xpk.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BBk8_Xpk.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BEdAvgYp.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BEdAvgYp.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BJ9KKLWf.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BJ9KKLWf.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BKW04JRY.js +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BKW04JRY.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BKW04JRY.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BOiOqwrA.js +0 -3
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BOiOqwrA.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BOiOqwrA.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BQIf5msi.js.br +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BQIf5msi.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BUkXSKT3.js +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BUkXSKT3.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BUkXSKT3.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BW6P0Ecp.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BW6P0Ecp.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BcbX6huO.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BcbX6huO.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BoX_BZZY.js +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BoX_BZZY.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BoX_BZZY.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/Bp8N7Z1t.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/Bp8N7Z1t.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/C0rPkxmP.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/C0rPkxmP.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/C3cROXCy.js +0 -9
- package/build/bosun-app/frontend/client/_app/immutable/chunks/C3cROXCy.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/C3cROXCy.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/C9yBjdYI.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/C9yBjdYI.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CCYriF4C.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CCYriF4C.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CHCMKZAC.js +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CHCMKZAC.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CHCMKZAC.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CR-uVjxM.js +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CR-uVjxM.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CR-uVjxM.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CR5IRTqC.js +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CR5IRTqC.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CR5IRTqC.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/ClLUwVGq.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/ClLUwVGq.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DEz15oJb.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DEz15oJb.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DGc0An5V.js +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DGc0An5V.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DGc0An5V.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DJnDF3d9.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DJnDF3d9.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DNvczHUR.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DNvczHUR.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DXsF11_5.js +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DXsF11_5.js.br +0 -2
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DXsF11_5.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/Dba0_Upf.js +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/Dba0_Upf.js.br +0 -2
- package/build/bosun-app/frontend/client/_app/immutable/chunks/Dba0_Upf.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DjujL8K1.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DjujL8K1.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DnMQeiTY.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DnMQeiTY.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DuQdgMax.js +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DuQdgMax.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DuQdgMax.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/OERrxy3_.js +0 -64
- package/build/bosun-app/frontend/client/_app/immutable/chunks/OERrxy3_.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/OERrxy3_.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/ddC1NP9R.js +0 -2
- package/build/bosun-app/frontend/client/_app/immutable/chunks/ddC1NP9R.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/ddC1NP9R.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/joiJcRPz.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/joiJcRPz.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/ouMvMh56.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/ouMvMh56.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/qiSVE_6c.js +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/qiSVE_6c.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/qiSVE_6c.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/sKHuRf4Z.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/sKHuRf4Z.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/entry/app.Bni-2yHM.js +0 -2
- package/build/bosun-app/frontend/client/_app/immutable/entry/app.Bni-2yHM.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/entry/app.Bni-2yHM.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/entry/start.Bwh8stkk.js +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/entry/start.Bwh8stkk.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/entry/start.Bwh8stkk.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/0.CyFCeOko.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/0.CyFCeOko.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/1.D9Za90TC.js +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/nodes/1.D9Za90TC.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/1.D9Za90TC.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/10.CQP8ZYdc.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/10.CQP8ZYdc.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/15.drIyAxl2.js.br +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/nodes/15.drIyAxl2.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/17.C-6g-4TG.js +0 -3
- package/build/bosun-app/frontend/client/_app/immutable/nodes/17.C-6g-4TG.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/17.C-6g-4TG.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/18.CKu_cfLu.js +0 -11
- package/build/bosun-app/frontend/client/_app/immutable/nodes/18.CKu_cfLu.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/18.CKu_cfLu.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/2.lZxPEqtw.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/2.lZxPEqtw.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/3.BjH4Ma-k.js +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/nodes/3.BjH4Ma-k.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/3.BjH4Ma-k.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/4.B_swg0wq.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/4.B_swg0wq.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/5.CJfS926N.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/5.CJfS926N.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/6.4aRjHu4u.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/6.4aRjHu4u.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/8.BZFIHe4g.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/8.BZFIHe4g.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/9.BYJRzNt4.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/9.BYJRzNt4.js.gz +0 -0
- package/build/bosun-app/frontend/server/chunks/chunks/schemas.js-W-DP3mDr.js.map +0 -1
- package/build/bosun-app/frontend/server/chunks/chunks/source-selection.js-Cc6RX6-m.js.map +0 -1
- package/build/bosun-app/frontend/server/chunks/entries/endpoints/traces/api/proxy/_...path_/_server.ts.js-CHrOiduq.js.map +0 -1
- package/build/bosun-app/frontend/server/chunks/entries/pages/traces/conversations/_conversationId_/latency/_page.svelte.js-tdUdTo4m.js.map +0 -1
- package/build/bosun-app/frontend/server/chunks/entries/pages/traces/conversations/_conversationId_/traces/_page.svelte.js-Ca79DBzJ.js.map +0 -1
- package/build/bosun-app/frontend/server/chunks/entries/pages/traces/conversations/_layout.svelte.js-Dvn3tfM7.js.map +0 -1
- package/build/bosun-app/frontend/server/chunks/nodes/0.js-CoDyOiLt.js +0 -9
- package/build/bosun-app/frontend/server/chunks/nodes/0.js-CoDyOiLt.js.map +0 -1
- package/build/bosun-app/frontend/server/chunks/nodes/1.js-BesNpd2w.js +0 -9
- package/build/bosun-app/frontend/server/chunks/nodes/10.js-DN5elTKV.js +0 -9
- package/build/bosun-app/frontend/server/chunks/nodes/10.js-DN5elTKV.js.map +0 -1
- package/build/bosun-app/frontend/server/chunks/nodes/17.js-DExEAB_e.js +0 -9
- package/build/bosun-app/frontend/server/chunks/nodes/17.js-DExEAB_e.js.map +0 -1
- package/build/bosun-app/frontend/server/chunks/nodes/18.js-OLWFvVu0.js +0 -9
- package/build/bosun-app/frontend/server/chunks/nodes/18.js-OLWFvVu0.js.map +0 -1
- package/build/bosun-app/frontend/server/chunks/nodes/2.js-DdMhYSQT.js +0 -9
- package/build/bosun-app/frontend/server/chunks/nodes/2.js-DdMhYSQT.js.map +0 -1
- package/build/bosun-app/frontend/server/chunks/nodes/3.js-DRo_79wF.js +0 -9
- package/build/bosun-app/frontend/server/chunks/nodes/3.js-DRo_79wF.js.map +0 -1
- package/build/bosun-app/frontend/server/chunks/nodes/4.js-Bb8ZnG8K.js +0 -9
- package/build/bosun-app/frontend/server/chunks/nodes/4.js-Bb8ZnG8K.js.map +0 -1
- package/build/bosun-app/frontend/server/chunks/nodes/5.js-DNbqpjRZ.js +0 -9
- package/build/bosun-app/frontend/server/chunks/nodes/6.js-MMZWg86o.js +0 -9
- package/build/bosun-app/frontend/server/chunks/nodes/6.js-MMZWg86o.js.map +0 -1
- package/build/bosun-app/frontend/server/chunks/nodes/8.js-Cs981zJ4.js +0 -9
- package/build/bosun-app/frontend/server/chunks/nodes/8.js-Cs981zJ4.js.map +0 -1
- package/build/bosun-app/frontend/server/chunks/nodes/9.js-h4jeZZT-.js +0 -9
- package/build/bosun-app/frontend/server/chunks/nodes/9.js-h4jeZZT-.js.map +0 -1
- package/build/build/agent-service.d.ts +0 -8
- package/build/build/agent-service.d.ts.map +0 -1
- package/build/build/agent-service.js +0 -32
- package/build/build/text-function.d.ts +0 -6
- package/build/build/text-function.d.ts.map +0 -1
- package/build/build/text-function.js +0 -55
- /package/build/bosun-app/frontend/client/_app/immutable/assets/{ReadOnlyMonacoDiff.iiWNRlR-.css → Modal.iiWNRlR-.css} +0 -0
- /package/build/bosun-app/frontend/client/_app/immutable/assets/{ReadOnlyMonacoDiff.iiWNRlR-.css.br → Modal.iiWNRlR-.css.br} +0 -0
- /package/build/bosun-app/frontend/client/_app/immutable/assets/{ReadOnlyMonacoDiff.iiWNRlR-.css.gz → Modal.iiWNRlR-.css.gz} +0 -0
package/build/bosun-app/frontend/client/_app/immutable/nodes/{10.CQP8ZYdc.js → 10.BP2gctlm.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../chunks/DLQqXQ6R.js","../chunks/C1FmrZbK.js","../assets/editor.BMIWPGx3.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{c as yn,a as g,h as Ca,f as I,d as Ms,b as Me,t as We}from"../chunks/CCYriF4C.js";import{a as wn,o as Pa}from"../chunks/DnMQeiTY.js";import{p as kn,f as Le,j as e,a as Sn,n as w,w as L,bq as La,r as u,y as i,d as Ar,t as H,x as Pt,c as f,s as m,o as Ne,T as $a}from"../chunks/CR-uVjxM.js";import{s as q}from"../chunks/B0nqNj93.js";import{i as j}from"../chunks/BQIf5msi.js";import{M as Qr,R as Ea,k as cs}from"../chunks/C3cROXCy.js";import{e as cr,i as us}from"../chunks/DuQdgMax.js";import{h as Ra}from"../chunks/DjujL8K1.js";import{a as ds,s as Fn,c as Bt,r as lr,d as pn,b as Aa}from"../chunks/CR5IRTqC.js";import{s as Oe,c as Ur}from"../chunks/C9yBjdYI.js";import{b as On,a as ja}from"../chunks/B9pMb6OP.js";import{g as Oa,P as Na}from"../chunks/CHCMKZAC.js";import{B as ct}from"../chunks/joiJcRPz.js";import{P as Ma,C as fs}from"../chunks/BW6P0Ecp.js";import{I as gn}from"../chunks/DJnDF3d9.js";import{T as Ds,a as Wr}from"../chunks/BEdAvgYp.js";import{h as Da,I as Gt}from"../chunks/BBk8_Xpk.js";import{r as Fa,p as tr}from"../chunks/BcbX6huO.js";import{p as vs}from"../chunks/B8q_gCwD.js";import{_ as ps}from"../chunks/C1FmrZbK.js";import{b as qa}from"../chunks/ClLUwVGq.js";import{e as za,a as Ja}from"../chunks/BU7aeYn4.js";import{t as Fe}from"../chunks/BUkXSKT3.js";import{R as Br}from"../chunks/sKHuRf4Z.js";import{i as kr}from"../chunks/DgGeUDDh.js";const Fs=/^[a-z0-9]+(-[a-z0-9]+)*$/,Tn=(t,r,s,o="")=>{const n=t.split(":");if(t.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;o=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const b=n.pop(),k=n.pop(),T={provider:n.length>0?n[0]:o,prefix:k,name:b};return r&&!xn(T)?null:T}const l=n[0],v=l.split("-");if(v.length>1){const b={provider:o,prefix:v.shift(),name:v.join("-")};return r&&!xn(b)?null:b}if(s&&o===""){const b={provider:o,prefix:"",name:l};return r&&!xn(b,s)?null:b}return null},xn=(t,r)=>t?!!((r&&t.prefix===""||t.prefix)&&t.name):!1;function Ha(t,r){const s=t.icons,o=t.aliases||Object.create(null),n=Object.create(null);function l(v){if(s[v])return n[v]=[];if(!(v in n)){n[v]=null;const b=o[v]&&o[v].parent,k=b&&l(b);k&&(n[v]=[b].concat(k))}return n[v]}return Object.keys(s).concat(Object.keys(o)).forEach(l),n}const qs=Object.freeze({left:0,top:0,width:16,height:16}),_n=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),In=Object.freeze({...qs,..._n}),qn=Object.freeze({...In,body:"",hidden:!1});function Va(t,r){const s={};!t.hFlip!=!r.hFlip&&(s.hFlip=!0),!t.vFlip!=!r.vFlip&&(s.vFlip=!0);const o=((t.rotate||0)+(r.rotate||0))%4;return o&&(s.rotate=o),s}function gs(t,r){const s=Va(t,r);for(const o in qn)o in _n?o in t&&!(o in s)&&(s[o]=_n[o]):o in r?s[o]=r[o]:o in t&&(s[o]=t[o]);return s}function Ua(t,r,s){const o=t.icons,n=t.aliases||Object.create(null);let l={};function v(b){l=gs(o[b]||n[b],l)}return v(r),s.forEach(v),gs(t,l)}function zs(t,r){const s=[];if(typeof t!="object"||typeof t.icons!="object")return s;t.not_found instanceof Array&&t.not_found.forEach(n=>{r(n,null),s.push(n)});const o=Ha(t);for(const n in o){const l=o[n];l&&(r(n,Ua(t,n,l)),s.push(n))}return s}const Ba={provider:"",aliases:{},not_found:{},...qs};function Nn(t,r){for(const s in r)if(s in t&&typeof t[s]!=typeof r[s])return!1;return!0}function Js(t){if(typeof t!="object"||t===null)return null;const r=t;if(typeof r.prefix!="string"||!t.icons||typeof t.icons!="object"||!Nn(t,Ba))return null;const s=r.icons;for(const n in s){const l=s[n];if(!n||typeof l.body!="string"||!Nn(l,qn))return null}const o=r.aliases||Object.create(null);for(const n in o){const l=o[n],v=l.parent;if(!n||typeof v!="string"||!s[v]&&!o[v]||!Nn(l,qn))return null}return r}const ms=Object.create(null);function Ga(t,r){return{provider:t,prefix:r,icons:Object.create(null),missing:new Set}}function jr(t,r){const s=ms[t]||(ms[t]=Object.create(null));return s[r]||(s[r]=Ga(t,r))}function Hs(t,r){return Js(r)?zs(r,(s,o)=>{o?t.icons[s]=o:t.missing.add(s)}):[]}function Ka(t,r,s){try{if(typeof s.body=="string")return t.icons[r]={...s},!0}catch{}return!1}let Xr=!1;function Vs(t){return typeof t=="boolean"&&(Xr=t),Xr}function Qa(t){const r=typeof t=="string"?Tn(t,!0,Xr):t;if(r){const s=jr(r.provider,r.prefix),o=r.name;return s.icons[o]||(s.missing.has(o)?null:void 0)}}function Wa(t,r){const s=Tn(t,!0,Xr);if(!s)return!1;const o=jr(s.provider,s.prefix);return r?Ka(o,s.name,r):(o.missing.add(s.name),!0)}function Xa(t,r){if(typeof t!="object")return!1;if(typeof r!="string"&&(r=t.provider||""),Xr&&!r&&!t.prefix){let o=!1;return Js(t)&&(t.prefix="",zs(t,(n,l)=>{Wa(n,l)&&(o=!0)})),o}const s=t.prefix;return xn({prefix:s,name:"a"})?!!Hs(jr(r,s),t):!1}const Us=Object.freeze({width:null,height:null}),Bs=Object.freeze({...Us,..._n}),Ya=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Za=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function hs(t,r,s){if(r===1)return t;if(s=s||100,typeof t=="number")return Math.ceil(t*r*s)/s;if(typeof t!="string")return t;const o=t.split(Ya);if(o===null||!o.length)return t;const n=[];let l=o.shift(),v=Za.test(l);for(;;){if(v){const b=parseFloat(l);isNaN(b)?n.push(l):n.push(Math.ceil(b*r*s)/s)}else n.push(l);if(l=o.shift(),l===void 0)return n.join("");v=!v}}function eo(t,r="defs"){let s="";const o=t.indexOf("<"+r);for(;o>=0;){const n=t.indexOf(">",o),l=t.indexOf("</"+r);if(n===-1||l===-1)break;const v=t.indexOf(">",l);if(v===-1)break;s+=t.slice(n+1,l).trim(),t=t.slice(0,o).trim()+t.slice(v+1)}return{defs:s,content:t}}function to(t,r){return t?"<defs>"+t+"</defs>"+r:r}function ro(t,r,s){const o=eo(t);return to(o.defs,r+o.content+s)}const no=t=>t==="unset"||t==="undefined"||t==="none";function so(t,r){const s={...In,...t},o={...Bs,...r},n={left:s.left,top:s.top,width:s.width,height:s.height};let l=s.body;[s,o].forEach(R=>{const A=[],P=R.hFlip,D=R.vFlip;let V=R.rotate;P?D?V+=2:(A.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),A.push("scale(-1 1)"),n.top=n.left=0):D&&(A.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),A.push("scale(1 -1)"),n.top=n.left=0);let B;switch(V<0&&(V-=Math.floor(V/4)*4),V=V%4,V){case 1:B=n.height/2+n.top,A.unshift("rotate(90 "+B.toString()+" "+B.toString()+")");break;case 2:A.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:B=n.width/2+n.left,A.unshift("rotate(-90 "+B.toString()+" "+B.toString()+")");break}V%2===1&&(n.left!==n.top&&(B=n.left,n.left=n.top,n.top=B),n.width!==n.height&&(B=n.width,n.width=n.height,n.height=B)),A.length&&(l=ro(l,'<g transform="'+A.join(" ")+'">',"</g>"))});const v=o.width,b=o.height,k=n.width,T=n.height;let C,$;v===null?($=b===null?"1em":b==="auto"?T:b,C=hs($,k/T)):(C=v==="auto"?k:v,$=b===null?hs(C,T/k):b==="auto"?T:b);const O={},ae=(R,A)=>{no(A)||(O[R]=A.toString())};ae("width",C),ae("height",$);const K=[n.left,n.top,k,T];return O.viewBox=K.join(" "),{attributes:O,viewBox:K,body:l}}const ao=/\sid="(\S+)"/g,xs=new Map;function oo(t){t=t.replace(/[0-9]+$/,"")||"a";const r=xs.get(t)||0;return xs.set(t,r+1),r?`${t}${r}`:t}function io(t){const r=[];let s;for(;s=ao.exec(t);)r.push(s[1]);if(!r.length)return t;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(n=>{const l=oo(n),v=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+v+')([")]|\\.[a-z])',"g"),"$1"+l+o+"$3")}),t=t.replace(new RegExp(o,"g"),""),t}const zn=Object.create(null);function lo(t,r){zn[t]=r}function Jn(t){return zn[t]||zn[""]}function Vn(t){let r;if(typeof t.resources=="string")r=[t.resources];else if(r=t.resources,!(r instanceof Array)||!r.length)return null;return{resources:r,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}const Un=Object.create(null),Gr=["https://api.simplesvg.com","https://api.unisvg.com"],bn=[];for(;Gr.length>0;)Gr.length===1||Math.random()>.5?bn.push(Gr.shift()):bn.push(Gr.pop());Un[""]=Vn({resources:["https://api.iconify.design"].concat(bn)});function co(t,r){const s=Vn(r);return s===null?!1:(Un[t]=s,!0)}function Bn(t){return Un[t]}const uo=()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}};let bs=uo();function fo(t,r){const s=Bn(t);if(!s)return 0;let o;if(!s.maxURL)o=0;else{let n=0;s.resources.forEach(v=>{n=Math.max(n,v.length)});const l=r+".json?icons=";o=s.maxURL-n-s.path.length-l.length}return o}function vo(t){return t===404}const po=(t,r,s)=>{const o=[],n=fo(t,r),l="icons";let v={type:l,provider:t,prefix:r,icons:[]},b=0;return s.forEach((k,T)=>{b+=k.length+1,b>=n&&T>0&&(o.push(v),v={type:l,provider:t,prefix:r,icons:[]},b=k.length),v.icons.push(k)}),o.push(v),o};function go(t){if(typeof t=="string"){const r=Bn(t);if(r)return r.path}return"/"}const mo=(t,r,s)=>{if(!bs){s("abort",424);return}let o=go(r.provider);switch(r.type){case"icons":{const l=r.prefix,v=r.icons.join(","),b=new URLSearchParams({icons:v});o+=l+".json?"+b.toString();break}case"custom":{const l=r.uri;o+=l.slice(0,1)==="/"?l.slice(1):l;break}default:s("abort",400);return}let n=503;bs(t+o).then(l=>{const v=l.status;if(v!==200){setTimeout(()=>{s(vo(v)?"abort":"next",v)});return}return n=501,l.json()}).then(l=>{if(typeof l!="object"||l===null){setTimeout(()=>{l===404?s("abort",l):s("next",n)});return}setTimeout(()=>{s("success",l)})}).catch(()=>{s("next",n)})},ho={prepare:po,send:mo};function Gs(t,r){t.forEach(s=>{const o=s.loaderCallbacks;o&&(s.loaderCallbacks=o.filter(n=>n.id!==r))})}function xo(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const r=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!r.length)return;let s=!1;const o=t.provider,n=t.prefix;r.forEach(l=>{const v=l.icons,b=v.pending.length;v.pending=v.pending.filter(k=>{if(k.prefix!==n)return!0;const T=k.name;if(t.icons[T])v.loaded.push({provider:o,prefix:n,name:T});else if(t.missing.has(T))v.missing.push({provider:o,prefix:n,name:T});else return s=!0,!0;return!1}),v.pending.length!==b&&(s||Gs([t],l.id),l.callback(v.loaded.slice(0),v.missing.slice(0),v.pending.slice(0),l.abort))})}))}let bo=0;function yo(t,r,s){const o=bo++,n=Gs.bind(null,s,o);if(!r.pending.length)return n;const l={id:o,icons:r,callback:t,abort:n};return s.forEach(v=>{(v.loaderCallbacks||(v.loaderCallbacks=[])).push(l)}),n}function _o(t){const r={loaded:[],missing:[],pending:[]},s=Object.create(null);t.sort((n,l)=>n.provider!==l.provider?n.provider.localeCompare(l.provider):n.prefix!==l.prefix?n.prefix.localeCompare(l.prefix):n.name.localeCompare(l.name));let o={provider:"",prefix:"",name:""};return t.forEach(n=>{if(o.name===n.name&&o.prefix===n.prefix&&o.provider===n.provider)return;o=n;const l=n.provider,v=n.prefix,b=n.name,k=s[l]||(s[l]=Object.create(null)),T=k[v]||(k[v]=jr(l,v));let C;b in T.icons?C=r.loaded:v===""||T.missing.has(b)?C=r.missing:C=r.pending;const $={provider:l,prefix:v,name:b};C.push($)}),r}function wo(t,r=!0,s=!1){const o=[];return t.forEach(n=>{const l=typeof n=="string"?Tn(n,r,s):n;l&&o.push(l)}),o}const ko={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function So(t,r,s,o){const n=t.resources.length,l=t.random?Math.floor(Math.random()*n):t.index;let v;if(t.random){let E=t.resources.slice(0);for(v=[];E.length>1;){const Q=Math.floor(Math.random()*E.length);v.push(E[Q]),E=E.slice(0,Q).concat(E.slice(Q+1))}v=v.concat(E)}else v=t.resources.slice(l).concat(t.resources.slice(0,l));const b=Date.now();let k="pending",T=0,C,$=null,O=[],ae=[];typeof o=="function"&&ae.push(o);function K(){$&&(clearTimeout($),$=null)}function R(){k==="pending"&&(k="aborted"),K(),O.forEach(E=>{E.status==="pending"&&(E.status="aborted")}),O=[]}function A(E,Q){Q&&(ae=[]),typeof E=="function"&&ae.push(E)}function P(){return{startTime:b,payload:r,status:k,queriesSent:T,queriesPending:O.length,subscribe:A,abort:R}}function D(){k="failed",ae.forEach(E=>{E(void 0,C)})}function V(){O.forEach(E=>{E.status==="pending"&&(E.status="aborted")}),O=[]}function B(E,Q,$e){const Se=Q!=="success";switch(O=O.filter(le=>le!==E),k){case"pending":break;case"failed":if(Se||!t.dataAfterTimeout)return;break;default:return}if(Q==="abort"){C=$e,D();return}if(Se){C=$e,O.length||(v.length?fe():D());return}if(K(),V(),!t.random){const le=t.resources.indexOf(E.resource);le!==-1&&le!==t.index&&(t.index=le)}k="completed",ae.forEach(le=>{le($e)})}function fe(){if(k!=="pending")return;K();const E=v.shift();if(E===void 0){if(O.length){$=setTimeout(()=>{K(),k==="pending"&&(V(),D())},t.timeout);return}D();return}const Q={status:"pending",resource:E,callback:($e,Se)=>{B(Q,$e,Se)}};O.push(Q),T++,$=setTimeout(fe,t.rotate),s(E,r,Q.callback)}return setTimeout(fe),P}function Ks(t){const r={...ko,...t};let s=[];function o(){s=s.filter(v=>v().status==="pending")}function n(v,b,k){const T=So(r,v,b,(C,$)=>{o(),k&&k(C,$)});return s.push(T),T}function l(v){return s.find(b=>v(b))||null}return{query:n,find:l,setIndex:v=>{r.index=v},getIndex:()=>r.index,cleanup:o}}function ys(){}const Mn=Object.create(null);function To(t){if(!Mn[t]){const r=Bn(t);if(!r)return;Mn[t]={config:r,redundancy:Ks(r)}}return Mn[t]}function Io(t,r,s){let o,n;if(typeof t=="string"){const l=Jn(t);if(!l)return s(void 0,424),ys;n=l.send;const v=To(t);v&&(o=v.redundancy)}else{const l=Vn(t);if(l){o=Ks(l);const v=Jn(t.resources?t.resources[0]:"");v&&(n=v.send)}}return!o||!n?(s(void 0,424),ys):o.query(r,n,s)().abort}function _s(){}function Co(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,xo(t)}))}function Po(t){const r=[],s=[];return t.forEach(o=>{(o.match(Fs)?r:s).push(o)}),{valid:r,invalid:s}}function Kr(t,r,s){function o(){const n=t.pendingIcons;r.forEach(l=>{n&&n.delete(l),t.icons[l]||t.missing.add(l)})}if(s&&typeof s=="object")try{if(!Hs(t,s).length){o();return}}catch(n){console.error(n)}o(),Co(t)}function ws(t,r){t instanceof Promise?t.then(s=>{r(s)}).catch(()=>{r(null)}):r(t)}function Lo(t,r){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(r).sort():t.iconsToLoad=r,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:s,prefix:o}=t,n=t.iconsToLoad;if(delete t.iconsToLoad,!n||!n.length)return;const l=t.loadIcon;if(t.loadIcons&&(n.length>1||!l)){ws(t.loadIcons(n,o,s),T=>{Kr(t,n,T)});return}if(l){n.forEach(T=>{ws(l(T,o,s),C=>{Kr(t,[T],C?{prefix:o,icons:{[T]:C}}:null)})});return}const{valid:v,invalid:b}=Po(n);if(b.length&&Kr(t,b,null),!v.length)return;const k=o.match(Fs)?Jn(s):null;if(!k){Kr(t,v,null);return}k.prepare(s,o,v).forEach(T=>{Io(s,T,C=>{Kr(t,T.icons,C)})})}))}const $o=(t,r)=>{const s=_o(wo(t,!0,Vs()));if(!s.pending.length){let b=!0;return r&&setTimeout(()=>{b&&r(s.loaded,s.missing,s.pending,_s)}),()=>{b=!1}}const o=Object.create(null),n=[];let l,v;return s.pending.forEach(b=>{const{provider:k,prefix:T}=b;if(T===v&&k===l)return;l=k,v=T,n.push(jr(k,T));const C=o[k]||(o[k]=Object.create(null));C[T]||(C[T]=[])}),s.pending.forEach(b=>{const{provider:k,prefix:T,name:C}=b,$=jr(k,T),O=$.pendingIcons||($.pendingIcons=new Set);O.has(C)||(O.add(C),o[k][T].push(C))}),n.forEach(b=>{const k=o[b.provider][b.prefix];k.length&&Lo(b,k)}),r?yo(r,s,n):_s};function Eo(t,r){const s={...t};for(const o in r){const n=r[o],l=typeof n;o in Us?(n===null||n&&(l==="string"||l==="number"))&&(s[o]=n):l===typeof s[o]&&(s[o]=o==="rotate"?n%4:n)}return s}const Ro=/[\s,]+/;function Ao(t,r){r.split(Ro).forEach(s=>{switch(s.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0;break}})}function jo(t,r=0){const s=t.replace(/^-?[0-9.]*/,"");function o(n){for(;n<0;)n+=4;return n%4}if(s===""){const n=parseInt(t);return isNaN(n)?0:o(n)}else if(s!==t){let n=0;switch(s){case"%":n=25;break;case"deg":n=90}if(n){let l=parseFloat(t.slice(0,t.length-s.length));return isNaN(l)?0:(l=l/n,l%1===0?o(l):0)}}return r}function Oo(t,r){let s=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const o in r)s+=" "+o+'="'+r[o]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+s+">"+t+"</svg>"}function No(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Mo(t){return"data:image/svg+xml,"+No(t)}function Do(t){return'url("'+Mo(t)+'")'}const ks={...Bs,inline:!1},Fo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},qo={display:"inline-block"},Hn={"background-color":"currentColor"},Qs={"background-color":"transparent"},Ss={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Ts={"-webkit-mask":Hn,mask:Hn,background:Qs};for(const t in Ts){const r=Ts[t];for(const s in Ss)r[t+"-"+s]=Ss[s]}function zo(t){return t+(t.match(/^[-0-9.]+$/)?"px":"")}function Jo(t,r){const s=Eo(ks,r),o=r.mode||"svg",n=o==="svg"?{...Fo}:{};t.body.indexOf("xlink:")===-1&&delete n["xmlns:xlink"];let l=typeof r.style=="string"?r.style:"";for(let P in r){const D=r[P];if(D!==void 0)switch(P){case"icon":case"style":case"onLoad":case"mode":case"ssr":break;case"inline":case"hFlip":case"vFlip":s[P]=D===!0||D==="true"||D===1;break;case"flip":typeof D=="string"&&Ao(s,D);break;case"color":l=l+(l.length>0&&l.trim().slice(-1)!==";"?";":"")+"color: "+D+"; ";break;case"rotate":typeof D=="string"?s[P]=jo(D):typeof D=="number"&&(s[P]=D);break;case"ariaHidden":case"aria-hidden":D!==!0&&D!=="true"&&delete n["aria-hidden"];break;default:if(P.slice(0,3)==="on:")break;ks[P]===void 0&&(n[P]=D)}}const v=so(t,s),b=v.attributes;if(s.inline&&(l="vertical-align: -0.125em; "+l),o==="svg")return Object.assign(n,b),l!==""&&(n.style=l),{svg:!0,attributes:n,body:io(v.body)};const{body:k,width:T,height:C}=t,$=o==="mask"||(o==="bg"?!1:k.indexOf("currentColor")!==-1),O=Oo(k,{...b,width:T+"",height:C+""}),K={"--svg":Do(O)},R=P=>{const D=b[P];D&&(K[P]=zo(D))};R("width"),R("height"),Object.assign(K,qo,$?Hn:Qs);let A="";for(const P in K)A+=P+": "+K[P]+";";return n.style=A+l,{svg:!1,attributes:n}}Vs(!0);lo("",ho);if(typeof document<"u"&&typeof window<"u"){const t=window;if(t.IconifyPreload!==void 0){const r=t.IconifyPreload,s="Invalid IconifyPreload syntax.";typeof r=="object"&&r!==null&&(r instanceof Array?r:[r]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!Xa(o))&&console.error(s)}catch{console.error(s)}})}if(t.IconifyProviders!==void 0){const r=t.IconifyProviders;if(typeof r=="object"&&r!==null)for(let s in r){const o="IconifyProviders["+s+"] is invalid.";try{const n=r[s];if(typeof n!="object"||!n||n.resources===void 0)continue;co(s,n)||console.error(o)}catch{console.error(o)}}}}function Ho(){try{return typeof window!="object"}catch{return!0}}function Vo(t,r,s,o){function n(){r.loading&&(r.loading.abort(),r.loading=null)}if(typeof t=="object"&&t!==null&&typeof t.body=="string")return r.name="",n(),{data:{...In,...t}};let l;if(typeof t!="string"||(l=Tn(t,!1,!0))===null)return n(),null;const v=Qa(l);if(!v)return!Ho()&&(!r.loading||r.loading.name!==t)&&(n(),r.name="",r.loading={name:t,abort:$o([l],s)}),null;n(),r.name!==t&&(r.name=t,o&&!r.destroyed&&setTimeout(()=>{o(t)}));const b=["iconify"];return l.prefix!==""&&b.push("iconify--"+l.prefix),l.provider!==""&&b.push("iconify--"+l.provider),{data:v,classes:b}}function Uo(t,r){return t?Jo({...In,...t},r):null}var Bo=new Set(["$$slots","$$events","$$legacy"]),Go=Ca("<svg></svg>"),Ko=I("<span></span>");function Kt(t,r){kn(r,!0);const s={name:"",loading:null,destroyed:!1},o=Fa(r,Bo);let n=L(0),l=w(()=>(e(n),Vo(r.icon,s,b,r.onload))),v=w(()=>{const $=e(l)?Uo(e(l).data,o):null;return $&&e(l).classes&&o.class===void 0&&($.attributes.class=(typeof o.class=="string"?o.class+" ":"")+e(l).classes.join(" ")),$});function b(){La(n)}wn(()=>{s.destroyed=!0,s.loading&&(s.loading.abort(),s.loading=null)});var k=yn(),T=Le(k);{var C=$=>{var O=yn(),ae=Le(O);{var K=A=>{var P=Go();ds(P,()=>({...e(v).attributes})),Da(P,()=>e(v).body,!0),u(P),g(A,P)},R=A=>{var P=Ko();ds(P,()=>({...e(v).attributes})),g(A,P)};j(ae,A=>{e(v).svg?A(K):A(R,-1)})}g($,O)};j(T,$=>{e(v)&&$(C)})}g(t,k),Sn()}var Qo=I('<div class="w-full"></div>');function Is(t,r){kn(r,!0);let s=L(null),o=null,n=[],l=null,v=!1,b,k=tr(r,"language",3,"plaintext"),T=tr(r,"height",3,120),C=tr(r,"readOnly",3,!1),$=[],O=L(!1);function ae(R){e(O)||R.stopPropagation()}Pa(async()=>{var B,fe;if(!b)return;b.addEventListener("wheel",ae,{capture:!0,passive:!0}),za();const R=await ps(()=>import("../chunks/DLQqXQ6R.js").then(E=>E.e),__vite__mapDeps([0,1,2]),import.meta.url);if(v)return;l=R,Ja(R);const A=k()==="json"?"json":k()==="markdown"?"markdown":"plaintext";i(s,R.editor.create(b,{value:r.value??"",language:A,theme:"bosun-dark",lineNumbers:"off",fontSize:14,fontFamily:'ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',automaticLayout:!0,minimap:{enabled:!1},wordBasedSuggestions:"off",wordWrap:"bounded",wordWrapColumn:75,wrappingStrategy:"advanced",scrollbar:{vertical:"hidden",horizontal:"hidden"},overviewRulerLanes:0,renderLineHighlight:"none",folding:!1,renderWhitespace:"none",padding:{top:4,bottom:4},readOnly:C(),domReadOnly:C(),matchBrackets:"never",bracketPairColorization:{enabled:!1},guides:{highlightActiveBracketPair:!1,bracketPairs:!1,bracketPairsHorizontal:!1},occurrencesHighlight:"off",selectionHighlight:!1,unicodeHighlight:{ambiguousCharacters:!1,nonBasicASCII:!1,invisibleCharacters:!1,includeStrings:!1,includeComments:!1},autoClosingQuotes:"never"}),!0);const P=e(s);if(!P)return;o=P.getModel(),n.push(P.onDidFocusEditorText(()=>{i(O,!0)})),n.push(P.onDidChangeModelContent(()=>{var E;try{const Q=P.getValue();if(Q===r.value)return;(E=r.onChange)==null||E.call(r,Q)}catch(Q){console.error("MiniEditor change error",Q)}})),n.push(P.onDidBlurEditorText(()=>{var E;i(O,!1);try{(E=r.onBlur)==null||E.call(r,P.getValue())}catch{}}));const D=(B=P.onDidFocusEditorWidget)==null?void 0:B.call(P,()=>{i(O,!0)});D&&n.push(D);const V=(fe=P.onDidBlurEditorWidget)==null?void 0:fe.call(P,()=>{var E;i(O,!1);try{(E=r.onBlur)==null||E.call(r,P.getValue())}catch{}});V&&n.push(V)}),wn(()=>{v=!0;try{b.removeEventListener("wheel",ae,{capture:!0})}catch{}for(const A of n)try{A.dispose()}catch{}n=[];const R=o;o=null;try{if(e(s)){try{e(s).setModel(null)}catch{}e(s).dispose()}}finally{i(s,null)}try{R==null||R.dispose()}catch{}l=null}),Ar(()=>{if(!e(s))return;const R=k()==="json"?"json":k()==="markdown"?"markdown":"plaintext",A=e(s).getModel();if(!A||A.getLanguageId()===R)return;let P=!1;return(l?Promise.resolve(l):ps(()=>import("../chunks/DLQqXQ6R.js").then(V=>V.e),__vite__mapDeps([0,1,2]),import.meta.url)).then(V=>{if(!P)try{V.editor.setModelLanguage(A,R)}catch{}}),()=>{P=!0}}),Ar(()=>{e(s)&&r.value!==e(s).getValue()&&e(s).setValue(r.value??"")}),Ar(()=>{var R;(R=e(s))==null||R.updateOptions({readOnly:C(),domReadOnly:C()})}),Ar(()=>{const R=r.highlights;if(!e(s)||!o||!l)return;const A=l,P=o.getLineCount(),D=[];for(const V of R??[]){const B=Math.max(1,Math.min(P,Number(V.startLine)||1)),fe=Math.max(B,Math.min(P,Number(V.endLine)||B)),E=o.getLineMaxColumn(fe);if(D.push({range:new A.Range(B,1,fe,E),options:{inlineClassName:V.className}}),V.className==="test-expected-output")for(let Q=B;Q<=fe;Q++){const $e=o.getLineContent(Q),Se=/<\/?[A-Za-z][^>]*?>/g;let le;for(;le=Se.exec($e);){const Lt=(le.index??0)+1,Xe=Math.min(o.getLineMaxColumn(Q),Lt+String(le[0]??"").length);Xe<=Lt||D.push({range:new A.Range(Q,Lt,Q,Xe),options:{inlineClassName:"test-expected-output-tag"}})}}}$=e(s).deltaDecorations($,D)});var K=Qo();qa(K,R=>b=R,()=>b),H(()=>Fn(K,`height:${T()}px`)),g(t,K),Sn()}var Wo=I('<button type="button" class="inline-flex items-center text-nowrap rounded border-0 bg-transparent px-1 py-0.5 text-rc-gray-400 transition-colors hover:bg-rc-gray-900 hover:text-rc-gray-200 focus:outline-none focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent disabled:hover:text-rc-gray-400">Fix</button>'),Xo=I('<button type="button" class="inline-flex items-center text-nowrap rounded border-0 bg-transparent px-1 py-0.5 text-rc-gray-400 transition-colors hover:bg-rc-gray-900 hover:text-rc-gray-200 focus:outline-none focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent disabled:hover:text-rc-gray-400">Analyze</button>'),Yo=I('<div><div class="mb-1 text-xs text-rc-gray-300"> </div> <div class="whitespace-pre-wrap break-words text-rc-gray-100"> </div></div>'),Zo=I('<div class="flex flex-col gap-3"></div>'),Cs=I('<div class="p-2 text-rc-gray-300">Loading…</div>'),Ps=I('<div class="p-2 text-red-400"> </div>'),ei=I('<div class="flex h-full flex-col gap-2"><div class="grid grid-cols-2 gap-2"><div class="flex items-center justify-start"><!></div> <div class="flex items-center justify-end"><!></div></div> <!></div>'),ti=I('<div class="h-[55vh]"><!></div>'),ri=I("<!> <!> <!>",1),ni=I('<!> <div class="mt-2 h-[55vh]"><!></div>',1),si=I('<div class="mt-1 flex flex-wrap items-center gap-x-2 gap-y-1"><!> <button type="button" class="inline-flex items-center text-nowrap rounded border-0 bg-transparent px-1 py-0.5 text-rc-gray-400 transition-colors hover:bg-rc-gray-900 hover:text-rc-gray-200 focus:outline-none focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent disabled:hover:text-rc-gray-400"> </button> <!> <button type="button" class="inline-flex items-center text-nowrap rounded border-0 bg-transparent px-1 py-0.5 text-rc-gray-400 transition-colors hover:bg-rc-gray-900 hover:text-rc-gray-200 focus:outline-none focus-visible:outline-none">See variants</button> <button type="button" class="inline-flex items-center text-nowrap rounded border-0 bg-transparent px-1 py-0.5 text-rc-gray-400 transition-colors hover:bg-rc-gray-900 hover:text-rc-gray-200 focus:outline-none focus-visible:outline-none">Prompt</button> <button type="button" class="inline-flex items-center text-nowrap rounded border-0 bg-transparent px-1 py-0.5 text-rc-gray-400 transition-colors hover:bg-rc-gray-900 hover:text-rc-gray-200 focus:outline-none focus-visible:outline-none">Conversation</button> <button type="button" class="inline-flex items-center text-nowrap rounded border-0 bg-transparent px-1 py-0.5 text-rc-gray-400 transition-colors hover:bg-rc-gray-900 hover:text-rc-gray-200 focus:outline-none focus-visible:outline-none">Context</button> <button type="button" class="inline-flex items-center text-nowrap rounded border-0 bg-transparent px-1 py-0.5 text-rc-gray-400 transition-colors hover:bg-rc-gray-900 hover:text-rc-gray-200 focus:outline-none focus-visible:outline-none">Debug</button></div> <!> <!> <!>',1);function Ls(t,r){kn(r,!0);let s=tr(r,"actionsDisabled",3,!1),o=tr(r,"actionsInert",3,!1),n=tr(r,"addTestDisabled",3,!1),l=tr(r,"showAnalyze",3,!0),v=tr(r,"analyzeDisabled",3,!1),b=tr(r,"fixDisabled",3,!1),k=L(!1),T=L(!1),C=L(!1),$=L("errors"),O=L("prompt"),ae=L(null),K=L(null),R=L(null),A=L(null),P=L(null),D=L(null),V=L(null),B=L(Pt({prompt:!1,conversation:!1,context:!1,errors:!1,traces:!1,logs:!1})),fe=L(Pt({prompt:null,conversation:null,context:null,errors:null,traces:null,logs:null})),E=0,Q=L(null),$e=null,Se=L("idle"),le=null;function Lt(S){try{return{raw:S,formatted:JSON.stringify(JSON.parse(S),null,2)}}catch{return{raw:S,formatted:S}}}async function Xe(S){const X=await Fe.tests.resultEntry.query({agent:S.agent,region:r.region,testId:S.id,resultKey:S.key,timestamp:S.timestamp,index:S.run});return Lt(X)}function Ke(S){return S==="prompt"?e(K)!==null&&e(ae)!==null:S==="conversation"?e(R)!==null:S==="context"?e(A)!==null:S==="errors"?e(P)!==null:S==="traces"?e(D)!==null:e(V)!==null}async function Nt(S){if(Ke(S)||e(B)[S])return;const X=E;i(B,{...e(B),[S]:!0},!0),i(fe,{...e(fe),[S]:null},!0);try{if(S==="prompt"){const[me,G]=await Promise.all([Xe(r.links.renderedPrompt),Xe(r.links.receivedPrompt)]);if(X!==E)return;i(ae,me,!0),i(K,G,!0)}else{const me=S==="conversation"?r.links.conversation:S==="context"?r.links.context:S==="errors"?r.links.errors:S==="traces"?r.links.traces:r.links.logs,G=await Xe(me);if(X!==E)return;S==="conversation"?i(R,G,!0):S==="context"?i(A,G,!0):S==="errors"?i(P,G,!0):S==="traces"?i(D,G,!0):i(V,G,!0)}}catch(me){if(X!==E)return;console.error(me),i(fe,{...e(fe),[S]:"Failed to load content"},!0)}finally{X===E&&i(B,{...e(B),[S]:!1},!0)}}function Qt(){i(ae,null),i(K,null),i(R,null),i(A,null),i(P,null),i(D,null),i(V,null),i(B,{prompt:!1,conversation:!1,context:!1,errors:!1,traces:!1,logs:!1},!0),i(fe,{prompt:null,conversation:null,context:null,errors:null,traces:null,logs:null},!0)}function rr(){E+=1,i($,"errors"),Qt(),i(k,!0),Nt("errors")}function tt(S){E+=1,i(O,S,!0),Qt(),i(T,!0),Nt(S)}function ur(S){return S==="prompt"?"Prompt":S==="conversation"?"Conversation":"Context"}function nr(S){i($,S,!0),Nt(S)}async function ut(){if(e(Se)!=="adding"){i(Se,"adding");try{await r.onAddTest(),i(Se,"added")}catch(S){console.error("Failed to add test",S),i(Se,"failed")}le&&clearTimeout(le),le=window.setTimeout(()=>{i(Se,"idle"),le=null},2500)}}async function Yr(S){if(!(!e(K)||!e(ae)))try{const X=S==="raw"?e(K).raw:e(ae).raw;await navigator.clipboard.writeText(X),i(Q,S,!0),$e&&clearTimeout($e),$e=window.setTimeout(()=>{i(Q,null),$e=null},2e3)}catch(X){console.error("Failed to copy prompt",X)}}wn(()=>{E+=1,$e&&clearTimeout($e),le&&clearTimeout(le)});var Zr=si(),Or=Le(Zr),Sr=f(Or);{var Tr=S=>{var X=Wo();H(()=>{X.inert=o(),X.disabled=s()||b()}),Me("click",X,function(...me){var G;(G=r.onFix)==null||G.apply(this,me)}),g(S,X)};j(Sr,S=>{r.onFix&&S(Tr)})}var Wt=m(Sr,2),dr=f(Wt,!0);u(Wt);var Nr=m(Wt,2);{var en=S=>{var X=Xo();H(()=>X.disabled=v()),Me("click",X,function(...me){var G;(G=r.onAnalyze)==null||G.apply(this,me)}),g(S,X)};j(Nr,S=>{l()&&S(en)})}var Mr=m(Nr,2),oe=m(Mr,2),fr=m(oe,2),qe=m(fr,2),Cn=m(qe,2);u(Or);var tn=m(Or,2);{var rn=S=>{{const X=G=>{var ze=Zo();cr(ze,21,()=>r.variants,$t=>$t.index,($t,dt)=>{var Mt=Yo(),Et=f(Mt),he=f(Et);u(Et);var Te=m(Et,2),xe=f(Te,!0);u(Te),u(Mt),H(()=>{Oe(Mt,1,`rounded-lg border p-3 ${e(dt).index===r.runIndex?"border-rc-green-450":"border-rc-gray-650"} ${e(dt).success?"bg-rc-green-700/80":"bg-rc-gray-900/60"}`),q(he,`Run ${e(dt).index??""}${e(dt).index===r.runIndex?" • selected":""}`),q(xe,e(dt).text||e(dt).errors||"—")}),g($t,Mt)}),u(ze),g(G,ze)};let me=w(()=>`Variants — ${r.scenario||"Test"}`);Qr(S,{get title(){return e(me)},class:"!w-[80vw] !max-w-4xl",get open(){return e(C)},set open(G){i(C,G,!0)},children:X,$$slots:{default:!0}})}};j(tn,S=>{e(C)&&S(rn)})}var ve=m(tn,2);{var sr=S=>{{const X=G=>{var ze=ti(),$t=f(ze);{var dt=xe=>{var Ee=Cs();g(xe,Ee)},Mt=xe=>{var Ee=Ps(),Y=f(Ee,!0);u(Ee),H(()=>q(Y,e(fe)[e(O)])),g(xe,Ee)},Et=xe=>{var Ee=ei(),Y=f(Ee),re=f(Y),ft=f(re);{let _t=w(()=>!e(K).raw.trim());ct(ft,{variant:"secondary",size:"small",get disabled(){return e(_t)},onclick:()=>Yr("raw"),children:(wt,Dt)=>{Ne();var vt=We();H(()=>q(vt,e(Q)==="raw"?"Copied raw prompt":"Copy raw prompt")),g(wt,vt)},$$slots:{default:!0}})}u(re);var rt=m(re,2),nt=f(rt);{let _t=w(()=>!e(ae).raw.trim());ct(nt,{variant:"secondary",size:"small",get disabled(){return e(_t)},onclick:()=>Yr("rendered"),children:(wt,Dt)=>{Ne();var vt=We();H(()=>q(vt,e(Q)==="rendered"?"Copied rendered prompt":"Copy rendered prompt")),g(wt,vt)},$$slots:{default:!0}})}u(rt),u(Y);var ar=m(Y,2);Ea(ar,{get original(){return e(K).formatted},get modified(){return e(ae).formatted},language:"markdown",class:"min-h-0 flex-1"}),u(Ee),g(xe,Ee)},he=xe=>{{let Ee=w(()=>e(R).formatted||"—");Br(xe,{get value(){return e(Ee)},language:"text",class:"h-full"})}},Te=xe=>{{let Ee=w(()=>e(A).formatted||"—");Br(xe,{get value(){return e(Ee)},language:"json",class:"h-full"})}};j($t,xe=>{e(B)[e(O)]?xe(dt):e(fe)[e(O)]?xe(Mt,1):e(O)==="prompt"&&e(K)&&e(ae)?xe(Et,2):e(O)==="conversation"&&e(R)?xe(he,3):e(O)==="context"&&e(A)&&xe(Te,4)})}u(ze),g(G,ze)};let me=w(()=>`${ur(e(O))} — ${r.scenario||"Test"} (run ${r.runIndex})`);Qr(S,{get title(){return e(me)},class:"!w-[85vw] !max-w-5xl",get open(){return e(T)},set open(G){i(T,G,!0)},children:X,$$slots:{default:!0}})}};j(ve,S=>{e(T)&&S(sr)})}var vr=m(ve,2);{var Ir=S=>{{const X=G=>{var ze=ni(),$t=Le(ze);Ds($t,{get value(){return e($)},ariaLabel:"Test run debug tabs",onChange:({value:Y})=>nr(Y),children:(Y,re)=>{var ft=ri(),rt=Le(ft);Wr(rt,{value:"errors",class:"px-3",children:(_t,wt)=>{Ne();var Dt=We("Errors");g(_t,Dt)},$$slots:{default:!0}});var nt=m(rt,2);Wr(nt,{value:"traces",class:"px-3",children:(_t,wt)=>{Ne();var Dt=We("Traces");g(_t,Dt)},$$slots:{default:!0}});var ar=m(nt,2);Wr(ar,{value:"logs",class:"px-3",children:(_t,wt)=>{Ne();var Dt=We("Logs");g(_t,Dt)},$$slots:{default:!0}}),g(Y,ft)},$$slots:{default:!0}});var dt=m($t,2),Mt=f(dt);{var Et=Y=>{var re=Cs();g(Y,re)},he=Y=>{var re=Ps(),ft=f(re,!0);u(re),H(()=>q(ft,e(fe)[e($)])),g(Y,re)},Te=Y=>{{let re=w(()=>e(P).formatted||"—");Br(Y,{get value(){return e(re)},language:"text",class:"h-full"})}},xe=Y=>{{let re=w(()=>e(D).formatted||"—");Br(Y,{get value(){return e(re)},language:"json",class:"h-full"})}},Ee=Y=>{{let re=w(()=>e(V).formatted||"—");Br(Y,{get value(){return e(re)},language:"text",class:"h-full"})}};j(Mt,Y=>{e(B)[e($)]?Y(Et):e(fe)[e($)]?Y(he,1):e($)==="errors"&&e(P)?Y(Te,2):e($)==="traces"&&e(D)?Y(xe,3):e($)==="logs"&&e(V)&&Y(Ee,4)})}u(dt),g(G,ze)};let me=w(()=>`Debug — ${r.scenario||"Test"} (run ${r.runIndex})`);Qr(S,{get title(){return e(me)},class:"!w-[85vw] !max-w-5xl",get open(){return e(k)},set open(G){i(k,G,!0)},children:X,$$slots:{default:!0}})}};j(vr,S=>{e(k)&&S(Ir)})}H(()=>{Wt.inert=o(),Wt.disabled=s()||n()||e(Se)==="adding",q(dr,e(Se)==="adding"?"Adding…":e(Se)==="added"?"Added":e(Se)==="failed"?"Failed":"Add test")}),Me("click",Wt,ut),Me("click",Mr,()=>i(C,!0)),Me("click",oe,()=>tt("prompt")),Me("click",fr,()=>tt("conversation")),Me("click",qe,()=>tt("context")),Me("click",Cn,rr),g(t,Zr),Sn()}Ms(["click"]);function ai(t,r){return[t.trim()==="LLM"?"":t.trim(),r.trim()].filter(Boolean).join(" ")}function oi(t){const r=ai(t.assertionLabel,t.assertionValue);return`You will be given the context, the conversation and the desired output and assertion about it. Change the prompt minimally so this will work. Try to provide as general solution as possible.
|
|
2
|
+
import{c as yn,a as g,h as Ca,f as I,d as Ms,b as Me,t as We}from"../chunks/D24F_tet.js";import{a as wn,o as Pa}from"../chunks/BHU9AXbn.js";import{p as kn,f as Le,j as e,a as Sn,n as w,w as L,br as La,r as u,y as i,d as Ar,t as H,x as Pt,c as f,s as m,o as Ne,O as $a}from"../chunks/0Q6TVg1G.js";import{s as q}from"../chunks/BOlSQbHE.js";import{i as j}from"../chunks/BZeEhZ9x.js";import{M as Qr,k as cs}from"../chunks/C5z36vOP.js";import{e as cr,i as us}from"../chunks/CR6hF_YT.js";import{h as Ea}from"../chunks/FLx39vZ1.js";import{a as ds,s as Fn,b as Bt,r as lr,f as pn,e as Ra}from"../chunks/DPfKTQVx.js";import{s as Oe,c as Ur}from"../chunks/VLxbY_3V.js";import{b as On,a as Aa}from"../chunks/B9e8MCJ2.js";import{g as ja,P as Oa}from"../chunks/CbXT0Qet.js";import{B as ct}from"../chunks/Csai_DUZ.js";import{P as Na,C as fs}from"../chunks/DOVgTfHj.js";import{I as gn}from"../chunks/BtJ1grIE.js";import{T as Ds,a as Wr}from"../chunks/BDIIq0ko.js";import{h as Ma,I as Gt}from"../chunks/NwoUwoIi.js";import{r as Da,p as tr}from"../chunks/D6r2pB3T.js";import{p as vs}from"../chunks/CINamuM5.js";import{_ as ps}from"../chunks/C1FmrZbK.js";import{b as Fa}from"../chunks/DJFKRYxi.js";import{e as qa,a as za}from"../chunks/BU7aeYn4.js";import{t as Fe}from"../chunks/BbB1C_YH.js";import{R as Br}from"../chunks/CkCJ1-zx.js";import{R as Ja}from"../chunks/CofRL0YY.js";import{i as kr}from"../chunks/DgGeUDDh.js";const Fs=/^[a-z0-9]+(-[a-z0-9]+)*$/,Tn=(t,r,s,o="")=>{const n=t.split(":");if(t.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;o=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const b=n.pop(),k=n.pop(),T={provider:n.length>0?n[0]:o,prefix:k,name:b};return r&&!xn(T)?null:T}const l=n[0],v=l.split("-");if(v.length>1){const b={provider:o,prefix:v.shift(),name:v.join("-")};return r&&!xn(b)?null:b}if(s&&o===""){const b={provider:o,prefix:"",name:l};return r&&!xn(b,s)?null:b}return null},xn=(t,r)=>t?!!((r&&t.prefix===""||t.prefix)&&t.name):!1;function Ha(t,r){const s=t.icons,o=t.aliases||Object.create(null),n=Object.create(null);function l(v){if(s[v])return n[v]=[];if(!(v in n)){n[v]=null;const b=o[v]&&o[v].parent,k=b&&l(b);k&&(n[v]=[b].concat(k))}return n[v]}return Object.keys(s).concat(Object.keys(o)).forEach(l),n}const qs=Object.freeze({left:0,top:0,width:16,height:16}),_n=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),In=Object.freeze({...qs,..._n}),qn=Object.freeze({...In,body:"",hidden:!1});function Va(t,r){const s={};!t.hFlip!=!r.hFlip&&(s.hFlip=!0),!t.vFlip!=!r.vFlip&&(s.vFlip=!0);const o=((t.rotate||0)+(r.rotate||0))%4;return o&&(s.rotate=o),s}function gs(t,r){const s=Va(t,r);for(const o in qn)o in _n?o in t&&!(o in s)&&(s[o]=_n[o]):o in r?s[o]=r[o]:o in t&&(s[o]=t[o]);return s}function Ua(t,r,s){const o=t.icons,n=t.aliases||Object.create(null);let l={};function v(b){l=gs(o[b]||n[b],l)}return v(r),s.forEach(v),gs(t,l)}function zs(t,r){const s=[];if(typeof t!="object"||typeof t.icons!="object")return s;t.not_found instanceof Array&&t.not_found.forEach(n=>{r(n,null),s.push(n)});const o=Ha(t);for(const n in o){const l=o[n];l&&(r(n,Ua(t,n,l)),s.push(n))}return s}const Ba={provider:"",aliases:{},not_found:{},...qs};function Nn(t,r){for(const s in r)if(s in t&&typeof t[s]!=typeof r[s])return!1;return!0}function Js(t){if(typeof t!="object"||t===null)return null;const r=t;if(typeof r.prefix!="string"||!t.icons||typeof t.icons!="object"||!Nn(t,Ba))return null;const s=r.icons;for(const n in s){const l=s[n];if(!n||typeof l.body!="string"||!Nn(l,qn))return null}const o=r.aliases||Object.create(null);for(const n in o){const l=o[n],v=l.parent;if(!n||typeof v!="string"||!s[v]&&!o[v]||!Nn(l,qn))return null}return r}const ms=Object.create(null);function Ga(t,r){return{provider:t,prefix:r,icons:Object.create(null),missing:new Set}}function jr(t,r){const s=ms[t]||(ms[t]=Object.create(null));return s[r]||(s[r]=Ga(t,r))}function Hs(t,r){return Js(r)?zs(r,(s,o)=>{o?t.icons[s]=o:t.missing.add(s)}):[]}function Ka(t,r,s){try{if(typeof s.body=="string")return t.icons[r]={...s},!0}catch{}return!1}let Xr=!1;function Vs(t){return typeof t=="boolean"&&(Xr=t),Xr}function Qa(t){const r=typeof t=="string"?Tn(t,!0,Xr):t;if(r){const s=jr(r.provider,r.prefix),o=r.name;return s.icons[o]||(s.missing.has(o)?null:void 0)}}function Wa(t,r){const s=Tn(t,!0,Xr);if(!s)return!1;const o=jr(s.provider,s.prefix);return r?Ka(o,s.name,r):(o.missing.add(s.name),!0)}function Xa(t,r){if(typeof t!="object")return!1;if(typeof r!="string"&&(r=t.provider||""),Xr&&!r&&!t.prefix){let o=!1;return Js(t)&&(t.prefix="",zs(t,(n,l)=>{Wa(n,l)&&(o=!0)})),o}const s=t.prefix;return xn({prefix:s,name:"a"})?!!Hs(jr(r,s),t):!1}const Us=Object.freeze({width:null,height:null}),Bs=Object.freeze({...Us,..._n}),Ya=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Za=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function hs(t,r,s){if(r===1)return t;if(s=s||100,typeof t=="number")return Math.ceil(t*r*s)/s;if(typeof t!="string")return t;const o=t.split(Ya);if(o===null||!o.length)return t;const n=[];let l=o.shift(),v=Za.test(l);for(;;){if(v){const b=parseFloat(l);isNaN(b)?n.push(l):n.push(Math.ceil(b*r*s)/s)}else n.push(l);if(l=o.shift(),l===void 0)return n.join("");v=!v}}function eo(t,r="defs"){let s="";const o=t.indexOf("<"+r);for(;o>=0;){const n=t.indexOf(">",o),l=t.indexOf("</"+r);if(n===-1||l===-1)break;const v=t.indexOf(">",l);if(v===-1)break;s+=t.slice(n+1,l).trim(),t=t.slice(0,o).trim()+t.slice(v+1)}return{defs:s,content:t}}function to(t,r){return t?"<defs>"+t+"</defs>"+r:r}function ro(t,r,s){const o=eo(t);return to(o.defs,r+o.content+s)}const no=t=>t==="unset"||t==="undefined"||t==="none";function so(t,r){const s={...In,...t},o={...Bs,...r},n={left:s.left,top:s.top,width:s.width,height:s.height};let l=s.body;[s,o].forEach(R=>{const A=[],P=R.hFlip,D=R.vFlip;let V=R.rotate;P?D?V+=2:(A.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),A.push("scale(-1 1)"),n.top=n.left=0):D&&(A.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),A.push("scale(1 -1)"),n.top=n.left=0);let B;switch(V<0&&(V-=Math.floor(V/4)*4),V=V%4,V){case 1:B=n.height/2+n.top,A.unshift("rotate(90 "+B.toString()+" "+B.toString()+")");break;case 2:A.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:B=n.width/2+n.left,A.unshift("rotate(-90 "+B.toString()+" "+B.toString()+")");break}V%2===1&&(n.left!==n.top&&(B=n.left,n.left=n.top,n.top=B),n.width!==n.height&&(B=n.width,n.width=n.height,n.height=B)),A.length&&(l=ro(l,'<g transform="'+A.join(" ")+'">',"</g>"))});const v=o.width,b=o.height,k=n.width,T=n.height;let C,$;v===null?($=b===null?"1em":b==="auto"?T:b,C=hs($,k/T)):(C=v==="auto"?k:v,$=b===null?hs(C,T/k):b==="auto"?T:b);const O={},ae=(R,A)=>{no(A)||(O[R]=A.toString())};ae("width",C),ae("height",$);const K=[n.left,n.top,k,T];return O.viewBox=K.join(" "),{attributes:O,viewBox:K,body:l}}const ao=/\sid="(\S+)"/g,xs=new Map;function oo(t){t=t.replace(/[0-9]+$/,"")||"a";const r=xs.get(t)||0;return xs.set(t,r+1),r?`${t}${r}`:t}function io(t){const r=[];let s;for(;s=ao.exec(t);)r.push(s[1]);if(!r.length)return t;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(n=>{const l=oo(n),v=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+v+')([")]|\\.[a-z])',"g"),"$1"+l+o+"$3")}),t=t.replace(new RegExp(o,"g"),""),t}const zn=Object.create(null);function lo(t,r){zn[t]=r}function Jn(t){return zn[t]||zn[""]}function Vn(t){let r;if(typeof t.resources=="string")r=[t.resources];else if(r=t.resources,!(r instanceof Array)||!r.length)return null;return{resources:r,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}const Un=Object.create(null),Gr=["https://api.simplesvg.com","https://api.unisvg.com"],bn=[];for(;Gr.length>0;)Gr.length===1||Math.random()>.5?bn.push(Gr.shift()):bn.push(Gr.pop());Un[""]=Vn({resources:["https://api.iconify.design"].concat(bn)});function co(t,r){const s=Vn(r);return s===null?!1:(Un[t]=s,!0)}function Bn(t){return Un[t]}const uo=()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}};let bs=uo();function fo(t,r){const s=Bn(t);if(!s)return 0;let o;if(!s.maxURL)o=0;else{let n=0;s.resources.forEach(v=>{n=Math.max(n,v.length)});const l=r+".json?icons=";o=s.maxURL-n-s.path.length-l.length}return o}function vo(t){return t===404}const po=(t,r,s)=>{const o=[],n=fo(t,r),l="icons";let v={type:l,provider:t,prefix:r,icons:[]},b=0;return s.forEach((k,T)=>{b+=k.length+1,b>=n&&T>0&&(o.push(v),v={type:l,provider:t,prefix:r,icons:[]},b=k.length),v.icons.push(k)}),o.push(v),o};function go(t){if(typeof t=="string"){const r=Bn(t);if(r)return r.path}return"/"}const mo=(t,r,s)=>{if(!bs){s("abort",424);return}let o=go(r.provider);switch(r.type){case"icons":{const l=r.prefix,v=r.icons.join(","),b=new URLSearchParams({icons:v});o+=l+".json?"+b.toString();break}case"custom":{const l=r.uri;o+=l.slice(0,1)==="/"?l.slice(1):l;break}default:s("abort",400);return}let n=503;bs(t+o).then(l=>{const v=l.status;if(v!==200){setTimeout(()=>{s(vo(v)?"abort":"next",v)});return}return n=501,l.json()}).then(l=>{if(typeof l!="object"||l===null){setTimeout(()=>{l===404?s("abort",l):s("next",n)});return}setTimeout(()=>{s("success",l)})}).catch(()=>{s("next",n)})},ho={prepare:po,send:mo};function Gs(t,r){t.forEach(s=>{const o=s.loaderCallbacks;o&&(s.loaderCallbacks=o.filter(n=>n.id!==r))})}function xo(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const r=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!r.length)return;let s=!1;const o=t.provider,n=t.prefix;r.forEach(l=>{const v=l.icons,b=v.pending.length;v.pending=v.pending.filter(k=>{if(k.prefix!==n)return!0;const T=k.name;if(t.icons[T])v.loaded.push({provider:o,prefix:n,name:T});else if(t.missing.has(T))v.missing.push({provider:o,prefix:n,name:T});else return s=!0,!0;return!1}),v.pending.length!==b&&(s||Gs([t],l.id),l.callback(v.loaded.slice(0),v.missing.slice(0),v.pending.slice(0),l.abort))})}))}let bo=0;function yo(t,r,s){const o=bo++,n=Gs.bind(null,s,o);if(!r.pending.length)return n;const l={id:o,icons:r,callback:t,abort:n};return s.forEach(v=>{(v.loaderCallbacks||(v.loaderCallbacks=[])).push(l)}),n}function _o(t){const r={loaded:[],missing:[],pending:[]},s=Object.create(null);t.sort((n,l)=>n.provider!==l.provider?n.provider.localeCompare(l.provider):n.prefix!==l.prefix?n.prefix.localeCompare(l.prefix):n.name.localeCompare(l.name));let o={provider:"",prefix:"",name:""};return t.forEach(n=>{if(o.name===n.name&&o.prefix===n.prefix&&o.provider===n.provider)return;o=n;const l=n.provider,v=n.prefix,b=n.name,k=s[l]||(s[l]=Object.create(null)),T=k[v]||(k[v]=jr(l,v));let C;b in T.icons?C=r.loaded:v===""||T.missing.has(b)?C=r.missing:C=r.pending;const $={provider:l,prefix:v,name:b};C.push($)}),r}function wo(t,r=!0,s=!1){const o=[];return t.forEach(n=>{const l=typeof n=="string"?Tn(n,r,s):n;l&&o.push(l)}),o}const ko={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function So(t,r,s,o){const n=t.resources.length,l=t.random?Math.floor(Math.random()*n):t.index;let v;if(t.random){let E=t.resources.slice(0);for(v=[];E.length>1;){const Q=Math.floor(Math.random()*E.length);v.push(E[Q]),E=E.slice(0,Q).concat(E.slice(Q+1))}v=v.concat(E)}else v=t.resources.slice(l).concat(t.resources.slice(0,l));const b=Date.now();let k="pending",T=0,C,$=null,O=[],ae=[];typeof o=="function"&&ae.push(o);function K(){$&&(clearTimeout($),$=null)}function R(){k==="pending"&&(k="aborted"),K(),O.forEach(E=>{E.status==="pending"&&(E.status="aborted")}),O=[]}function A(E,Q){Q&&(ae=[]),typeof E=="function"&&ae.push(E)}function P(){return{startTime:b,payload:r,status:k,queriesSent:T,queriesPending:O.length,subscribe:A,abort:R}}function D(){k="failed",ae.forEach(E=>{E(void 0,C)})}function V(){O.forEach(E=>{E.status==="pending"&&(E.status="aborted")}),O=[]}function B(E,Q,$e){const Se=Q!=="success";switch(O=O.filter(le=>le!==E),k){case"pending":break;case"failed":if(Se||!t.dataAfterTimeout)return;break;default:return}if(Q==="abort"){C=$e,D();return}if(Se){C=$e,O.length||(v.length?fe():D());return}if(K(),V(),!t.random){const le=t.resources.indexOf(E.resource);le!==-1&&le!==t.index&&(t.index=le)}k="completed",ae.forEach(le=>{le($e)})}function fe(){if(k!=="pending")return;K();const E=v.shift();if(E===void 0){if(O.length){$=setTimeout(()=>{K(),k==="pending"&&(V(),D())},t.timeout);return}D();return}const Q={status:"pending",resource:E,callback:($e,Se)=>{B(Q,$e,Se)}};O.push(Q),T++,$=setTimeout(fe,t.rotate),s(E,r,Q.callback)}return setTimeout(fe),P}function Ks(t){const r={...ko,...t};let s=[];function o(){s=s.filter(v=>v().status==="pending")}function n(v,b,k){const T=So(r,v,b,(C,$)=>{o(),k&&k(C,$)});return s.push(T),T}function l(v){return s.find(b=>v(b))||null}return{query:n,find:l,setIndex:v=>{r.index=v},getIndex:()=>r.index,cleanup:o}}function ys(){}const Mn=Object.create(null);function To(t){if(!Mn[t]){const r=Bn(t);if(!r)return;Mn[t]={config:r,redundancy:Ks(r)}}return Mn[t]}function Io(t,r,s){let o,n;if(typeof t=="string"){const l=Jn(t);if(!l)return s(void 0,424),ys;n=l.send;const v=To(t);v&&(o=v.redundancy)}else{const l=Vn(t);if(l){o=Ks(l);const v=Jn(t.resources?t.resources[0]:"");v&&(n=v.send)}}return!o||!n?(s(void 0,424),ys):o.query(r,n,s)().abort}function _s(){}function Co(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,xo(t)}))}function Po(t){const r=[],s=[];return t.forEach(o=>{(o.match(Fs)?r:s).push(o)}),{valid:r,invalid:s}}function Kr(t,r,s){function o(){const n=t.pendingIcons;r.forEach(l=>{n&&n.delete(l),t.icons[l]||t.missing.add(l)})}if(s&&typeof s=="object")try{if(!Hs(t,s).length){o();return}}catch(n){console.error(n)}o(),Co(t)}function ws(t,r){t instanceof Promise?t.then(s=>{r(s)}).catch(()=>{r(null)}):r(t)}function Lo(t,r){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(r).sort():t.iconsToLoad=r,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:s,prefix:o}=t,n=t.iconsToLoad;if(delete t.iconsToLoad,!n||!n.length)return;const l=t.loadIcon;if(t.loadIcons&&(n.length>1||!l)){ws(t.loadIcons(n,o,s),T=>{Kr(t,n,T)});return}if(l){n.forEach(T=>{ws(l(T,o,s),C=>{Kr(t,[T],C?{prefix:o,icons:{[T]:C}}:null)})});return}const{valid:v,invalid:b}=Po(n);if(b.length&&Kr(t,b,null),!v.length)return;const k=o.match(Fs)?Jn(s):null;if(!k){Kr(t,v,null);return}k.prepare(s,o,v).forEach(T=>{Io(s,T,C=>{Kr(t,T.icons,C)})})}))}const $o=(t,r)=>{const s=_o(wo(t,!0,Vs()));if(!s.pending.length){let b=!0;return r&&setTimeout(()=>{b&&r(s.loaded,s.missing,s.pending,_s)}),()=>{b=!1}}const o=Object.create(null),n=[];let l,v;return s.pending.forEach(b=>{const{provider:k,prefix:T}=b;if(T===v&&k===l)return;l=k,v=T,n.push(jr(k,T));const C=o[k]||(o[k]=Object.create(null));C[T]||(C[T]=[])}),s.pending.forEach(b=>{const{provider:k,prefix:T,name:C}=b,$=jr(k,T),O=$.pendingIcons||($.pendingIcons=new Set);O.has(C)||(O.add(C),o[k][T].push(C))}),n.forEach(b=>{const k=o[b.provider][b.prefix];k.length&&Lo(b,k)}),r?yo(r,s,n):_s};function Eo(t,r){const s={...t};for(const o in r){const n=r[o],l=typeof n;o in Us?(n===null||n&&(l==="string"||l==="number"))&&(s[o]=n):l===typeof s[o]&&(s[o]=o==="rotate"?n%4:n)}return s}const Ro=/[\s,]+/;function Ao(t,r){r.split(Ro).forEach(s=>{switch(s.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0;break}})}function jo(t,r=0){const s=t.replace(/^-?[0-9.]*/,"");function o(n){for(;n<0;)n+=4;return n%4}if(s===""){const n=parseInt(t);return isNaN(n)?0:o(n)}else if(s!==t){let n=0;switch(s){case"%":n=25;break;case"deg":n=90}if(n){let l=parseFloat(t.slice(0,t.length-s.length));return isNaN(l)?0:(l=l/n,l%1===0?o(l):0)}}return r}function Oo(t,r){let s=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const o in r)s+=" "+o+'="'+r[o]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+s+">"+t+"</svg>"}function No(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Mo(t){return"data:image/svg+xml,"+No(t)}function Do(t){return'url("'+Mo(t)+'")'}const ks={...Bs,inline:!1},Fo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},qo={display:"inline-block"},Hn={"background-color":"currentColor"},Qs={"background-color":"transparent"},Ss={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Ts={"-webkit-mask":Hn,mask:Hn,background:Qs};for(const t in Ts){const r=Ts[t];for(const s in Ss)r[t+"-"+s]=Ss[s]}function zo(t){return t+(t.match(/^[-0-9.]+$/)?"px":"")}function Jo(t,r){const s=Eo(ks,r),o=r.mode||"svg",n=o==="svg"?{...Fo}:{};t.body.indexOf("xlink:")===-1&&delete n["xmlns:xlink"];let l=typeof r.style=="string"?r.style:"";for(let P in r){const D=r[P];if(D!==void 0)switch(P){case"icon":case"style":case"onLoad":case"mode":case"ssr":break;case"inline":case"hFlip":case"vFlip":s[P]=D===!0||D==="true"||D===1;break;case"flip":typeof D=="string"&&Ao(s,D);break;case"color":l=l+(l.length>0&&l.trim().slice(-1)!==";"?";":"")+"color: "+D+"; ";break;case"rotate":typeof D=="string"?s[P]=jo(D):typeof D=="number"&&(s[P]=D);break;case"ariaHidden":case"aria-hidden":D!==!0&&D!=="true"&&delete n["aria-hidden"];break;default:if(P.slice(0,3)==="on:")break;ks[P]===void 0&&(n[P]=D)}}const v=so(t,s),b=v.attributes;if(s.inline&&(l="vertical-align: -0.125em; "+l),o==="svg")return Object.assign(n,b),l!==""&&(n.style=l),{svg:!0,attributes:n,body:io(v.body)};const{body:k,width:T,height:C}=t,$=o==="mask"||(o==="bg"?!1:k.indexOf("currentColor")!==-1),O=Oo(k,{...b,width:T+"",height:C+""}),K={"--svg":Do(O)},R=P=>{const D=b[P];D&&(K[P]=zo(D))};R("width"),R("height"),Object.assign(K,qo,$?Hn:Qs);let A="";for(const P in K)A+=P+": "+K[P]+";";return n.style=A+l,{svg:!1,attributes:n}}Vs(!0);lo("",ho);if(typeof document<"u"&&typeof window<"u"){const t=window;if(t.IconifyPreload!==void 0){const r=t.IconifyPreload,s="Invalid IconifyPreload syntax.";typeof r=="object"&&r!==null&&(r instanceof Array?r:[r]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!Xa(o))&&console.error(s)}catch{console.error(s)}})}if(t.IconifyProviders!==void 0){const r=t.IconifyProviders;if(typeof r=="object"&&r!==null)for(let s in r){const o="IconifyProviders["+s+"] is invalid.";try{const n=r[s];if(typeof n!="object"||!n||n.resources===void 0)continue;co(s,n)||console.error(o)}catch{console.error(o)}}}}function Ho(){try{return typeof window!="object"}catch{return!0}}function Vo(t,r,s,o){function n(){r.loading&&(r.loading.abort(),r.loading=null)}if(typeof t=="object"&&t!==null&&typeof t.body=="string")return r.name="",n(),{data:{...In,...t}};let l;if(typeof t!="string"||(l=Tn(t,!1,!0))===null)return n(),null;const v=Qa(l);if(!v)return!Ho()&&(!r.loading||r.loading.name!==t)&&(n(),r.name="",r.loading={name:t,abort:$o([l],s)}),null;n(),r.name!==t&&(r.name=t,o&&!r.destroyed&&setTimeout(()=>{o(t)}));const b=["iconify"];return l.prefix!==""&&b.push("iconify--"+l.prefix),l.provider!==""&&b.push("iconify--"+l.provider),{data:v,classes:b}}function Uo(t,r){return t?Jo({...In,...t},r):null}var Bo=new Set(["$$slots","$$events","$$legacy"]),Go=Ca("<svg></svg>"),Ko=I("<span></span>");function Kt(t,r){kn(r,!0);const s={name:"",loading:null,destroyed:!1},o=Da(r,Bo);let n=L(0),l=w(()=>(e(n),Vo(r.icon,s,b,r.onload))),v=w(()=>{const $=e(l)?Uo(e(l).data,o):null;return $&&e(l).classes&&o.class===void 0&&($.attributes.class=(typeof o.class=="string"?o.class+" ":"")+e(l).classes.join(" ")),$});function b(){La(n)}wn(()=>{s.destroyed=!0,s.loading&&(s.loading.abort(),s.loading=null)});var k=yn(),T=Le(k);{var C=$=>{var O=yn(),ae=Le(O);{var K=A=>{var P=Go();ds(P,()=>({...e(v).attributes})),Ma(P,()=>e(v).body,!0),u(P),g(A,P)},R=A=>{var P=Ko();ds(P,()=>({...e(v).attributes})),g(A,P)};j(ae,A=>{e(v).svg?A(K):A(R,-1)})}g($,O)};j(T,$=>{e(v)&&$(C)})}g(t,k),Sn()}var Qo=I('<div class="w-full"></div>');function Is(t,r){kn(r,!0);let s=L(null),o=null,n=[],l=null,v=!1,b,k=tr(r,"language",3,"plaintext"),T=tr(r,"height",3,120),C=tr(r,"readOnly",3,!1),$=[],O=L(!1);function ae(R){e(O)||R.stopPropagation()}Pa(async()=>{var B,fe;if(!b)return;b.addEventListener("wheel",ae,{capture:!0,passive:!0}),qa();const R=await ps(()=>import("../chunks/DLQqXQ6R.js").then(E=>E.e),__vite__mapDeps([0,1,2]),import.meta.url);if(v)return;l=R,za(R);const A=k()==="json"?"json":k()==="markdown"?"markdown":"plaintext";i(s,R.editor.create(b,{value:r.value??"",language:A,theme:"bosun-dark",lineNumbers:"off",fontSize:14,fontFamily:'ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',automaticLayout:!0,minimap:{enabled:!1},wordBasedSuggestions:"off",wordWrap:"bounded",wordWrapColumn:75,wrappingStrategy:"advanced",scrollbar:{vertical:"hidden",horizontal:"hidden"},overviewRulerLanes:0,renderLineHighlight:"none",folding:!1,renderWhitespace:"none",padding:{top:4,bottom:4},readOnly:C(),domReadOnly:C(),matchBrackets:"never",bracketPairColorization:{enabled:!1},guides:{highlightActiveBracketPair:!1,bracketPairs:!1,bracketPairsHorizontal:!1},occurrencesHighlight:"off",selectionHighlight:!1,unicodeHighlight:{ambiguousCharacters:!1,nonBasicASCII:!1,invisibleCharacters:!1,includeStrings:!1,includeComments:!1},autoClosingQuotes:"never"}),!0);const P=e(s);if(!P)return;o=P.getModel(),n.push(P.onDidFocusEditorText(()=>{i(O,!0)})),n.push(P.onDidChangeModelContent(()=>{var E;try{const Q=P.getValue();if(Q===r.value)return;(E=r.onChange)==null||E.call(r,Q)}catch(Q){console.error("MiniEditor change error",Q)}})),n.push(P.onDidBlurEditorText(()=>{var E;i(O,!1);try{(E=r.onBlur)==null||E.call(r,P.getValue())}catch{}}));const D=(B=P.onDidFocusEditorWidget)==null?void 0:B.call(P,()=>{i(O,!0)});D&&n.push(D);const V=(fe=P.onDidBlurEditorWidget)==null?void 0:fe.call(P,()=>{var E;i(O,!1);try{(E=r.onBlur)==null||E.call(r,P.getValue())}catch{}});V&&n.push(V)}),wn(()=>{v=!0;try{b.removeEventListener("wheel",ae,{capture:!0})}catch{}for(const A of n)try{A.dispose()}catch{}n=[];const R=o;o=null;try{if(e(s)){try{e(s).setModel(null)}catch{}e(s).dispose()}}finally{i(s,null)}try{R==null||R.dispose()}catch{}l=null}),Ar(()=>{if(!e(s))return;const R=k()==="json"?"json":k()==="markdown"?"markdown":"plaintext",A=e(s).getModel();if(!A||A.getLanguageId()===R)return;let P=!1;return(l?Promise.resolve(l):ps(()=>import("../chunks/DLQqXQ6R.js").then(V=>V.e),__vite__mapDeps([0,1,2]),import.meta.url)).then(V=>{if(!P)try{V.editor.setModelLanguage(A,R)}catch{}}),()=>{P=!0}}),Ar(()=>{e(s)&&r.value!==e(s).getValue()&&e(s).setValue(r.value??"")}),Ar(()=>{var R;(R=e(s))==null||R.updateOptions({readOnly:C(),domReadOnly:C()})}),Ar(()=>{const R=r.highlights;if(!e(s)||!o||!l)return;const A=l,P=o.getLineCount(),D=[];for(const V of R??[]){const B=Math.max(1,Math.min(P,Number(V.startLine)||1)),fe=Math.max(B,Math.min(P,Number(V.endLine)||B)),E=o.getLineMaxColumn(fe);if(D.push({range:new A.Range(B,1,fe,E),options:{inlineClassName:V.className}}),V.className==="test-expected-output")for(let Q=B;Q<=fe;Q++){const $e=o.getLineContent(Q),Se=/<\/?[A-Za-z][^>]*?>/g;let le;for(;le=Se.exec($e);){const Lt=(le.index??0)+1,Xe=Math.min(o.getLineMaxColumn(Q),Lt+String(le[0]??"").length);Xe<=Lt||D.push({range:new A.Range(Q,Lt,Q,Xe),options:{inlineClassName:"test-expected-output-tag"}})}}}$=e(s).deltaDecorations($,D)});var K=Qo();Fa(K,R=>b=R,()=>b),H(()=>Fn(K,`height:${T()}px`)),g(t,K),Sn()}var Wo=I('<button type="button" class="inline-flex items-center text-nowrap rounded border-0 bg-transparent px-1 py-0.5 text-rc-gray-400 transition-colors hover:bg-rc-gray-900 hover:text-rc-gray-200 focus:outline-none focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent disabled:hover:text-rc-gray-400">Fix</button>'),Xo=I('<button type="button" class="inline-flex items-center text-nowrap rounded border-0 bg-transparent px-1 py-0.5 text-rc-gray-400 transition-colors hover:bg-rc-gray-900 hover:text-rc-gray-200 focus:outline-none focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent disabled:hover:text-rc-gray-400">Analyze</button>'),Yo=I('<div><div class="mb-1 text-xs text-rc-gray-300"> </div> <div class="whitespace-pre-wrap break-words text-rc-gray-100"> </div></div>'),Zo=I('<div class="flex flex-col gap-3"></div>'),Cs=I('<div class="p-2 text-rc-gray-300">Loading…</div>'),Ps=I('<div class="p-2 text-red-400"> </div>'),ei=I('<div class="flex h-full flex-col gap-2"><div class="grid grid-cols-2 gap-2"><div class="flex items-center justify-start"><!></div> <div class="flex items-center justify-end"><!></div></div> <!></div>'),ti=I('<div class="h-[55vh]"><!></div>'),ri=I("<!> <!> <!>",1),ni=I('<!> <div class="mt-2 h-[55vh]"><!></div>',1),si=I('<div class="mt-1 flex flex-wrap items-center gap-x-2 gap-y-1"><!> <button type="button" class="inline-flex items-center text-nowrap rounded border-0 bg-transparent px-1 py-0.5 text-rc-gray-400 transition-colors hover:bg-rc-gray-900 hover:text-rc-gray-200 focus:outline-none focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent disabled:hover:text-rc-gray-400"> </button> <!> <button type="button" class="inline-flex items-center text-nowrap rounded border-0 bg-transparent px-1 py-0.5 text-rc-gray-400 transition-colors hover:bg-rc-gray-900 hover:text-rc-gray-200 focus:outline-none focus-visible:outline-none">See variants</button> <button type="button" class="inline-flex items-center text-nowrap rounded border-0 bg-transparent px-1 py-0.5 text-rc-gray-400 transition-colors hover:bg-rc-gray-900 hover:text-rc-gray-200 focus:outline-none focus-visible:outline-none">Prompt</button> <button type="button" class="inline-flex items-center text-nowrap rounded border-0 bg-transparent px-1 py-0.5 text-rc-gray-400 transition-colors hover:bg-rc-gray-900 hover:text-rc-gray-200 focus:outline-none focus-visible:outline-none">Conversation</button> <button type="button" class="inline-flex items-center text-nowrap rounded border-0 bg-transparent px-1 py-0.5 text-rc-gray-400 transition-colors hover:bg-rc-gray-900 hover:text-rc-gray-200 focus:outline-none focus-visible:outline-none">Context</button> <button type="button" class="inline-flex items-center text-nowrap rounded border-0 bg-transparent px-1 py-0.5 text-rc-gray-400 transition-colors hover:bg-rc-gray-900 hover:text-rc-gray-200 focus:outline-none focus-visible:outline-none">Debug</button></div> <!> <!> <!>',1);function Ls(t,r){kn(r,!0);let s=tr(r,"actionsDisabled",3,!1),o=tr(r,"actionsInert",3,!1),n=tr(r,"addTestDisabled",3,!1),l=tr(r,"showAnalyze",3,!0),v=tr(r,"analyzeDisabled",3,!1),b=tr(r,"fixDisabled",3,!1),k=L(!1),T=L(!1),C=L(!1),$=L("errors"),O=L("prompt"),ae=L(null),K=L(null),R=L(null),A=L(null),P=L(null),D=L(null),V=L(null),B=L(Pt({prompt:!1,conversation:!1,context:!1,errors:!1,traces:!1,logs:!1})),fe=L(Pt({prompt:null,conversation:null,context:null,errors:null,traces:null,logs:null})),E=0,Q=L(null),$e=null,Se=L("idle"),le=null;function Lt(S){try{return{raw:S,formatted:JSON.stringify(JSON.parse(S),null,2)}}catch{return{raw:S,formatted:S}}}async function Xe(S){const X=await Fe.tests.resultEntry.query({agent:S.agent,region:r.region,testId:S.id,resultKey:S.key,timestamp:S.timestamp,index:S.run});return Lt(X)}function Ke(S){return S==="prompt"?e(K)!==null&&e(ae)!==null:S==="conversation"?e(R)!==null:S==="context"?e(A)!==null:S==="errors"?e(P)!==null:S==="traces"?e(D)!==null:e(V)!==null}async function Nt(S){if(Ke(S)||e(B)[S])return;const X=E;i(B,{...e(B),[S]:!0},!0),i(fe,{...e(fe),[S]:null},!0);try{if(S==="prompt"){const[me,G]=await Promise.all([Xe(r.links.renderedPrompt),Xe(r.links.receivedPrompt)]);if(X!==E)return;i(ae,me,!0),i(K,G,!0)}else{const me=S==="conversation"?r.links.conversation:S==="context"?r.links.context:S==="errors"?r.links.errors:S==="traces"?r.links.traces:r.links.logs,G=await Xe(me);if(X!==E)return;S==="conversation"?i(R,G,!0):S==="context"?i(A,G,!0):S==="errors"?i(P,G,!0):S==="traces"?i(D,G,!0):i(V,G,!0)}}catch(me){if(X!==E)return;console.error(me),i(fe,{...e(fe),[S]:"Failed to load content"},!0)}finally{X===E&&i(B,{...e(B),[S]:!1},!0)}}function Qt(){i(ae,null),i(K,null),i(R,null),i(A,null),i(P,null),i(D,null),i(V,null),i(B,{prompt:!1,conversation:!1,context:!1,errors:!1,traces:!1,logs:!1},!0),i(fe,{prompt:null,conversation:null,context:null,errors:null,traces:null,logs:null},!0)}function rr(){E+=1,i($,"errors"),Qt(),i(k,!0),Nt("errors")}function tt(S){E+=1,i(O,S,!0),Qt(),i(T,!0),Nt(S)}function ur(S){return S==="prompt"?"Prompt":S==="conversation"?"Conversation":"Context"}function nr(S){i($,S,!0),Nt(S)}async function ut(){if(e(Se)!=="adding"){i(Se,"adding");try{await r.onAddTest(),i(Se,"added")}catch(S){console.error("Failed to add test",S),i(Se,"failed")}le&&clearTimeout(le),le=window.setTimeout(()=>{i(Se,"idle"),le=null},2500)}}async function Yr(S){if(!(!e(K)||!e(ae)))try{const X=S==="raw"?e(K).raw:e(ae).raw;await navigator.clipboard.writeText(X),i(Q,S,!0),$e&&clearTimeout($e),$e=window.setTimeout(()=>{i(Q,null),$e=null},2e3)}catch(X){console.error("Failed to copy prompt",X)}}wn(()=>{E+=1,$e&&clearTimeout($e),le&&clearTimeout(le)});var Zr=si(),Or=Le(Zr),Sr=f(Or);{var Tr=S=>{var X=Wo();H(()=>{X.inert=o(),X.disabled=s()||b()}),Me("click",X,function(...me){var G;(G=r.onFix)==null||G.apply(this,me)}),g(S,X)};j(Sr,S=>{r.onFix&&S(Tr)})}var Wt=m(Sr,2),dr=f(Wt,!0);u(Wt);var Nr=m(Wt,2);{var en=S=>{var X=Xo();H(()=>X.disabled=v()),Me("click",X,function(...me){var G;(G=r.onAnalyze)==null||G.apply(this,me)}),g(S,X)};j(Nr,S=>{l()&&S(en)})}var Mr=m(Nr,2),oe=m(Mr,2),fr=m(oe,2),qe=m(fr,2),Cn=m(qe,2);u(Or);var tn=m(Or,2);{var rn=S=>{{const X=G=>{var ze=Zo();cr(ze,21,()=>r.variants,$t=>$t.index,($t,dt)=>{var Mt=Yo(),Et=f(Mt),he=f(Et);u(Et);var Te=m(Et,2),xe=f(Te,!0);u(Te),u(Mt),H(()=>{Oe(Mt,1,`rounded-lg border p-3 ${e(dt).index===r.runIndex?"border-rc-green-450":"border-rc-gray-650"} ${e(dt).success?"bg-rc-green-700/80":"bg-rc-gray-900/60"}`),q(he,`Run ${e(dt).index??""}${e(dt).index===r.runIndex?" • selected":""}`),q(xe,e(dt).text||e(dt).errors||"—")}),g($t,Mt)}),u(ze),g(G,ze)};let me=w(()=>`Variants — ${r.scenario||"Test"}`);Qr(S,{get title(){return e(me)},class:"!w-[80vw] !max-w-4xl",get open(){return e(C)},set open(G){i(C,G,!0)},children:X,$$slots:{default:!0}})}};j(tn,S=>{e(C)&&S(rn)})}var ve=m(tn,2);{var sr=S=>{{const X=G=>{var ze=ti(),$t=f(ze);{var dt=xe=>{var Ee=Cs();g(xe,Ee)},Mt=xe=>{var Ee=Ps(),Y=f(Ee,!0);u(Ee),H(()=>q(Y,e(fe)[e(O)])),g(xe,Ee)},Et=xe=>{var Ee=ei(),Y=f(Ee),re=f(Y),ft=f(re);{let _t=w(()=>!e(K).raw.trim());ct(ft,{variant:"secondary",size:"small",get disabled(){return e(_t)},onclick:()=>Yr("raw"),children:(wt,Dt)=>{Ne();var vt=We();H(()=>q(vt,e(Q)==="raw"?"Copied raw prompt":"Copy raw prompt")),g(wt,vt)},$$slots:{default:!0}})}u(re);var rt=m(re,2),nt=f(rt);{let _t=w(()=>!e(ae).raw.trim());ct(nt,{variant:"secondary",size:"small",get disabled(){return e(_t)},onclick:()=>Yr("rendered"),children:(wt,Dt)=>{Ne();var vt=We();H(()=>q(vt,e(Q)==="rendered"?"Copied rendered prompt":"Copy rendered prompt")),g(wt,vt)},$$slots:{default:!0}})}u(rt),u(Y);var ar=m(Y,2);Ja(ar,{get original(){return e(K).formatted},get modified(){return e(ae).formatted},language:"markdown",class:"min-h-0 flex-1"}),u(Ee),g(xe,Ee)},he=xe=>{{let Ee=w(()=>e(R).formatted||"—");Br(xe,{get value(){return e(Ee)},language:"text",class:"h-full"})}},Te=xe=>{{let Ee=w(()=>e(A).formatted||"—");Br(xe,{get value(){return e(Ee)},language:"json",class:"h-full"})}};j($t,xe=>{e(B)[e(O)]?xe(dt):e(fe)[e(O)]?xe(Mt,1):e(O)==="prompt"&&e(K)&&e(ae)?xe(Et,2):e(O)==="conversation"&&e(R)?xe(he,3):e(O)==="context"&&e(A)&&xe(Te,4)})}u(ze),g(G,ze)};let me=w(()=>`${ur(e(O))} — ${r.scenario||"Test"} (run ${r.runIndex})`);Qr(S,{get title(){return e(me)},class:"!w-[85vw] !max-w-5xl",get open(){return e(T)},set open(G){i(T,G,!0)},children:X,$$slots:{default:!0}})}};j(ve,S=>{e(T)&&S(sr)})}var vr=m(ve,2);{var Ir=S=>{{const X=G=>{var ze=ni(),$t=Le(ze);Ds($t,{get value(){return e($)},ariaLabel:"Test run debug tabs",onChange:({value:Y})=>nr(Y),children:(Y,re)=>{var ft=ri(),rt=Le(ft);Wr(rt,{value:"errors",class:"px-3",children:(_t,wt)=>{Ne();var Dt=We("Errors");g(_t,Dt)},$$slots:{default:!0}});var nt=m(rt,2);Wr(nt,{value:"traces",class:"px-3",children:(_t,wt)=>{Ne();var Dt=We("Traces");g(_t,Dt)},$$slots:{default:!0}});var ar=m(nt,2);Wr(ar,{value:"logs",class:"px-3",children:(_t,wt)=>{Ne();var Dt=We("Logs");g(_t,Dt)},$$slots:{default:!0}}),g(Y,ft)},$$slots:{default:!0}});var dt=m($t,2),Mt=f(dt);{var Et=Y=>{var re=Cs();g(Y,re)},he=Y=>{var re=Ps(),ft=f(re,!0);u(re),H(()=>q(ft,e(fe)[e($)])),g(Y,re)},Te=Y=>{{let re=w(()=>e(P).formatted||"—");Br(Y,{get value(){return e(re)},language:"text",class:"h-full"})}},xe=Y=>{{let re=w(()=>e(D).formatted||"—");Br(Y,{get value(){return e(re)},language:"json",class:"h-full"})}},Ee=Y=>{{let re=w(()=>e(V).formatted||"—");Br(Y,{get value(){return e(re)},language:"text",class:"h-full"})}};j(Mt,Y=>{e(B)[e($)]?Y(Et):e(fe)[e($)]?Y(he,1):e($)==="errors"&&e(P)?Y(Te,2):e($)==="traces"&&e(D)?Y(xe,3):e($)==="logs"&&e(V)&&Y(Ee,4)})}u(dt),g(G,ze)};let me=w(()=>`Debug — ${r.scenario||"Test"} (run ${r.runIndex})`);Qr(S,{get title(){return e(me)},class:"!w-[85vw] !max-w-5xl",get open(){return e(k)},set open(G){i(k,G,!0)},children:X,$$slots:{default:!0}})}};j(vr,S=>{e(k)&&S(Ir)})}H(()=>{Wt.inert=o(),Wt.disabled=s()||n()||e(Se)==="adding",q(dr,e(Se)==="adding"?"Adding…":e(Se)==="added"?"Added":e(Se)==="failed"?"Failed":"Add test")}),Me("click",Wt,ut),Me("click",Mr,()=>i(C,!0)),Me("click",oe,()=>tt("prompt")),Me("click",fr,()=>tt("conversation")),Me("click",qe,()=>tt("context")),Me("click",Cn,rr),g(t,Zr),Sn()}Ms(["click"]);function ai(t,r){return[t.trim()==="LLM"?"":t.trim(),r.trim()].filter(Boolean).join(" ")}function oi(t){const r=ai(t.assertionLabel,t.assertionValue);return`You will be given the context, the conversation and the desired output and assertion about it. Change the prompt minimally so this will work. Try to provide as general solution as possible.
|
|
3
3
|
|
|
4
4
|
Context:
|
|
5
5
|
${t.context.trim()}
|
|
@@ -15,7 +15,7 @@ ${r}
|
|
|
15
15
|
|
|
16
16
|
Current incorrect outcome:
|
|
17
17
|
${t.currentIncorrectOutcome.trim()}`}function ii(t){const r=t<0?-1:1,s=Math.abs(t),o=.254829592,n=-.284496736,l=1.421413741,v=-1.453152027,b=1.061405429,T=1/(1+.3275911*s),C=1-((((b*T+v)*T+l)*T+n)*T+o)*T*Math.exp(-s*s);return r*C}function li(t){return .5*(1+ii(t/Math.SQRT2))}function Ws(t,r,s,o){if(!Number.isFinite(t)||!Number.isFinite(r)||!Number.isFinite(s)||!Number.isFinite(o)||r<=0||o<=0)return null;const n=t/r,l=s/o,v=(t+s)/(r+o),b=Math.sqrt(v*(1-v)*(1/r+1/o));if(!Number.isFinite(b)||b<=0)return null;const k=(l-n)/b,T=2*(1-li(Math.abs(k)));return Math.max(0,Math.min(1,T))}function Xs(t){return t==="higher"?"significantly better":"significantly worse"}function mn(t,r){if(!t||t.isOld)return null;const s=t.total_runs;if(s<=0)return null;const o=t.previous,n=o&&o.total_runs>0?o.success_count/o.total_runs:null,l=t.successes/s,v=n===null||l>=n?"higher":"lower",b=(()=>{if(s<5||!o||o.total_runs<=0)return!1;const ae=Ws(o.success_count,o.total_runs,t.successes,s);return ae!==null&&ae<.05})(),k=n===1&&l<1,T=n!==null&&n<1&&l===1,C=b?Xs(v):k?"Not 100% anymore":T?"100% now":void 0,$=Number.isFinite(r)&&r>0&&s<r;if(!$&&!C)return null;const O=$?Math.round(l*r):void 0;return{showExpected:$,expectedSuccesses:O,expectedRuns:r,significant:b,direction:v,comparisonLabel:C}}var ci=I('<link rel="preload" href="/ui/arrow_tests.svg" as="image"/>'),$s=I('<div class="p-2 text-gray-300">Loading…</div>'),Es=I('<div class="p-2 text-rc-red-600"> </div>'),ui=I('<div class="p-2 text-gray-400">No previous runs</div>'),di=I('<div class="border-rc-red-700 rounded border bg-rc-gray-900 px-3 py-2 text-sm text-rc-red-600"> </div>'),fi=I('<button type="button"><div class="flex items-baseline justify-between gap-2"><span class="font-semibold text-rc-gray-100"> </span> <span class="text-sm text-rc-gray-400"> </span></div> <div class="mt-1 text-sm text-rc-gray-400"> </div> <div class="mt-2 flex items-center justify-between gap-2 text-sm"><span> </span> <span class="text-rc-gray-300"> </span></div></button>'),vi=I('<div class="flex flex-col gap-2"><!> <!></div>'),Rs=I('<div class="p-3 text-gray-400">—</div>'),hn=I('<span class="ml-2 text-rc-gray-400"> </span>'),pi=I("<span> </span> <!>",1),As=I('<span class="text-rc-gray-500">—</span>'),js=I('<div class="mt-1 px-1 text-sm font-semibold text-rc-gray-300"><!></div>'),gi=I('<div class="flex items-center gap-2"><input class="rc-input w-44 svelte-rdft55" type="text" readonly=""/> <input class="rc-input min-w-0 flex-1 svelte-rdft55" type="text" placeholder="Assertion value" readonly=""/></div>'),Os=I('<div class="flex flex-col gap-2"><div> </div> <div><div class="flex items-center gap-0"><!> <span> </span></div> <!></div></div>'),mi=I('<div class="flex flex-wrap items-center gap-3"><div class="text-lg font-extrabold"><span> </span> <!></div></div> <div class="mt-3 flex flex-col gap-4"></div>',1),hi=I('<div class="flex flex-col gap-2 p-2"><input class="card-input-subtle pointer-events-none svelte-rdft55" type="text" placeholder="Author" readonly=""/> <!> <div class="flex flex-wrap items-center gap-3"><!> <!></div> <!></div> <div class="rounded-b border-t border-rc-gray-700 bg-rc-gray-980 p-2"><!></div>',1),xi=I('<div class="border-b border-rc-gray-700 p-2"><div class="grid grid-cols-[2.25rem,1fr] gap-2"><div class="flex flex-col items-center gap-1 pt-1"><!></div> <div class="min-w-0"><div><div><div class="grid grid-cols-[1fr,2.25rem] items-center gap-2"><input class="card-input-title pointer-events-none svelte-rdft55" type="text" placeholder="Scenario" readonly=""/> <button class="icon-btn justify-self-end text-gray-300 hover:text-gray-100 svelte-rdft55"><!></button></div> <!></div> <!></div></div></div></div>'),Ns=I('<div class="flex flex-col space-y-5"></div>'),bi=I('<div class="flex flex-col gap-3"><div class="flex flex-wrap items-center justify-between gap-3 border-b border-rc-gray-700 pb-3"><div class="flex flex-wrap items-center gap-3"><div class="flex items-center gap-2"><label class="text-rc-gray-300">Repeats</label> <!></div> <div class="flex items-center gap-2"><label class="text-rc-gray-300">Concurrency</label> <!></div> <span class="text-rc-gray-400"> </span></div></div> <div class="grid grid-cols-[2.25rem,1fr] items-center gap-2 border-b border-rc-gray-700 p-2"><div></div> <div class="flex flex-wrap items-center gap-x-4 gap-y-1 text-left text-rc-gray-300"><span> </span> <span> </span></div></div> <!></div>'),yi=I('<div class="grid min-h-[68vh] grid-cols-[18rem,minmax(0,1fr)] gap-4"><aside class="rc-scroll min-h-0 overflow-auto border-r border-rc-gray-700 pr-3"><!></aside> <section class="rc-scroll min-h-0 overflow-auto"><!></section></div>'),_i=I('<pre class="whitespace-pre-wrap font-mono text-gray-200"> </pre>'),wi=I(`<p class="mt-2 text-red-200">Bosun found an old JSON/JSONL test suite. This version only supports one YAML
|
|
18
|
-
file per test and will not read, modify, or replace the legacy files.</p> <a target="_blank" rel="noreferrer" class="mt-4 inline-flex rounded bg-red-200 px-3 py-2 font-semibold text-red-950 hover:bg-red-100">Open migration guide</a>`,1),ki=I('<p class="mt-2 break-words text-red-200"> </p> <!>',1),Si=I('<div class="flex h-full items-start justify-center overflow-auto p-8"><div role="alert" class="w-full max-w-2xl rounded border border-red-500 bg-red-950/30 p-5 text-red-100"><h2 class="text-xl font-semibold"> </h2> <!></div></div>'),Ti=I("<li> </li>"),Ii=I('<div class="mx-2 mt-2 rounded border border-red-500 bg-red-950/30 px-3 py-2 text-sm text-red-200"><div class="font-semibold">Orphaned tests</div> <ul class="mt-1 list-disc pl-5"></ul></div>'),Ci=I('<div class="mr-3 flex items-center gap-3"><span class="animate-pulse rounded bg-rc-green-200 px-3 py-1 text-white"> </span> <!></div>'),Pi=I("<!> New test",1),Li=I('<div class="pointer-events-none absolute -left-28 top-full mt-4 inline-flex -translate-x-1/2 flex-col items-center"><div class="relative w-50vw max-w-2xl"><img src="/ui/arrow_tests.svg" alt="Arrow" class="block h-auto w-full object-contain"/> <span class="absolute inset-0 mt-48 flex items-center justify-center text-center text-4xl font-extrabold text-rc-gray-200">No tests yet.<br/>Add the first one</span></div></div>'),$i=I("<!> History",1),Ei=I("<!> Collapse all",1),Ri=I("<div></div>"),Ai=I('<button aria-label="Pin/unpin all" title="Pin/unpin all"><!></button>'),Dn=I('<span><!><span class="ml-1"> </span></span>'),ji=I('<div class="translate-y-[5px]"><!></div>'),Oi=I('<button><!></button> <button title="Duplicate" class="icon-btn text-gray-300 hover:text-gray-100 disabled:cursor-not-allowed disabled:opacity-50 svelte-rdft55"><!></button> <button title="Delete" class="icon-btn text-gray-300 hover:text-gray-100 disabled:cursor-not-allowed disabled:opacity-50 svelte-rdft55"><!></button>',1),Ni=I("<span> </span> <!> <!>",1),Mi=I('<div class="rounded bg-rc-gray-930 px-2 py-2 text-sm text-rc-red-600"> </div>'),Di=I("<option> </option>"),Fi=I('<div class="flex items-center gap-2"><select class="rc-scroll rc-input w-36 svelte-rdft55" aria-label="Assertion Type"></select> <input class="rc-input min-w-0 flex-1 svelte-rdft55" type="text" placeholder="Assertion value"/></div>'),qi=I('<label class="inline-flex items-center gap-2 text-sm text-rc-gray-200"><input type="checkbox" class="checkbox"/> <span>Case-sensitive</span></label>'),zi=I('<div class="text-lg font-extrabold"><span> </span> <!> <!></div>'),Ji=I('<div class="mt-3 flex flex-col gap-4"></div>'),Hi=I('<div class="flex flex-col gap-2 p-2"><!> <input class="card-input-subtle svelte-rdft55" type="text" placeholder="Author"/> <!> <div class="flex flex-wrap items-center gap-3"><!> <!></div> <!></div> <div class="rounded-b border-t border-rc-gray-700 bg-rc-gray-980 p-2"><div class="flex flex-wrap items-center gap-3"><!> <!></div> <!></div>',1),Vi=I('<div class="border-b border-rc-gray-700 p-2"><div class="grid grid-cols-[2.25rem,1fr] gap-2"><div class="flex flex-col items-center gap-1"><!></div> <div class="min-w-0"><div><div><div class="grid grid-cols-[1fr,2.25rem] items-center gap-2"><input class="card-input-title svelte-rdft55" type="text" placeholder="Scenario"/> <button class="icon-btn justify-self-end text-gray-300 hover:text-gray-100 disabled:cursor-not-allowed disabled:opacity-50 svelte-rdft55"><!></button></div> <!></div> <!></div></div></div></div>'),Ui=I("<!> <!>",1),Bi=I('<div class="flex min-h-0 flex-1 flex-col overflow-hidden p-3"><!> <div class="mt-3 min-h-0 flex-1 overflow-hidden"><!></div></div>'),Gi=I('<div class="rc-scroll min-h-0 flex-1 overflow-auto"><div class="grid grid-cols-[2.25rem,1fr] items-center gap-2 border-b border-rc-gray-700 p-2"><!> <div class="flex flex-wrap items-center gap-x-4 gap-y-1 text-left text-rc-gray-300"><span> </span> <span> </span> <span> </span> <!></div></div> <!></div> <!>',1),Ki=I('<div class="flex h-full min-h-0 flex-col"><!> <div class="flex flex-none items-center justify-between gap-3 p-2"><div class="flex flex-wrap items-center gap-3 pl-11"><div class="flex items-center gap-2"><label class="text-rc-gray-300">Repeats</label> <!></div> <div class="flex items-center gap-2"><label class="text-rc-gray-300">Concurrency</label> <!></div></div> <div class="flex flex-wrap items-center gap-3"><!> <div class="relative inline-flex items-center"><!> <!></div> <!></div></div> <div class="flex flex-none items-center justify-between gap-3 px-2 pb-2"><!> <!></div> <div class="min-h-0 flex-1 overflow-hidden"><!></div></div>'),Qi=I("<!> <!> <!>",1);function _l(t,r){kn(r,!0);const{state:s,actions:o}=Oa(),n=w(()=>s.agentId),l=w(()=>s.region),v="BOSUN_LEGACY_TEST_SUITE:",b="https://github.com/recombine-ai/bosun/blob/main/TESTS_MIGRATION.md";function k(a){try{return structuredClone(a)}catch{try{return JSON.parse(JSON.stringify(a))}catch{return a}}}function T(a,c,d){return Math.max(c,Math.min(d,a))}let C=L(1),$=L(75),O=L(null);function ae(a){if(typeof localStorage>"u")return{repeats:1,concurrency:75,expandedTestIds:[]};try{const c=JSON.parse(localStorage.getItem(a)||"{}");return{repeats:T(Number(c.repeats)||1,1,500),concurrency:T(Number(c.concurrency)||75,1,75),expandedTestIds:Array.isArray(c.expandedTestIds)?c.expandedTestIds.filter(d=>typeof d=="string"):[]}}catch{return{repeats:1,concurrency:75,expandedTestIds:[]}}}function K(){!e(O)||typeof localStorage>"u"||localStorage.setItem(e(O),JSON.stringify({repeats:e(C),concurrency:e($),expandedTestIds:e(nt)}))}let R=L(null),A=L("context"),P=L(Pt({})),D=L(Pt({})),V=L(!1),B=L(!1),fe=L(!1),E=L(""),Q=L(null),$e=L(!1),Se=L(null),le=L(Pt([])),Lt=L(!1),Xe=L(null),Ke=L(null),Nt=L(Pt({})),Qt=L(!1),rr=L(null),tt=L(Pt([])),ur=0,nr=0;const ut=w(()=>e(Ke)?e(Nt)[e(Ke)]??null:null),Yr=w(()=>e(Lt)&&e(le).length===0&&!e(Xe)),Zr=w(()=>e(Qt)&&!e(ut)),Or=w(()=>new Set(e(tt))),Sr=w(()=>e(ut)?e(ut).rows.map(a=>sa(e(ut).timestamp,a)):[]),Tr=w(()=>aa(e(Sr)));function Wt(a,c){i(E,a,!0),i(Q,JSON.stringify(c??{},null,2),!0),i(fe,!0)}let dr=L(!1);async function Nr(a,c,d){var _;if(e(dr))return;i(dr,!0);const p=o.openPopover("analyze"),h=`Analysis — ${a} (run ${c})`;try{const y=await Fe.tests.analyzeRun.mutate({agent:d.agent,region:e(l),testId:d.id,index:d.run,timestamp:d.timestamp});if(((_=s.edit.popover)==null?void 0:_.requestId)!==p)return;o.setHighlightQuotes(y.quotes);let N=null;try{N=JSON.stringify(y.raw,null,2)}catch{N=null}o.setPopoverReady(p,{title:h,quotes:y.quotes,rationales:y.rationales,parallelCalls:y.parallelCalls,raw:N})}catch(y){console.error(y);const N=typeof(y==null?void 0:y.message)=="string"?y.message:(()=>{try{return JSON.stringify(y)}catch{return String(y)}})();o.setPopoverError(p,N||"Failed to analyze this response",{raw:N})}finally{i(dr,!1)}}const en=[{value:"llm-rubric",label:"LLM"},{value:"answer-relevance",label:"Answer Relevance (LLM)"},{value:"context-faithfulness",label:"Context Faithfulness (LLM)"},{value:"context-recall",label:"Context Recall (LLM)"},{value:"context-relevance",label:"Context Relevance (LLM)"},{value:"model-graded-closedqa",label:"Model-Graded Closed QA"},{value:"model-graded-factuality",label:"Model-Graded Factuality"},{value:"moderation",label:"Moderation"},{value:"classifier",label:"Classifier"},{value:"g-eval",label:"G-Eval"},{value:"factuality",label:"Factuality"},{value:"conversation-relevance",label:"Conversation Relevance"},{value:"equals",label:"Equals"},{value:"contains",label:"Contains"},{value:"icontains",label:"Contains (case-insensitive)"},{value:"contains-all",label:"Contains All"},{value:"contains-any",label:"Contains Any"},{value:"icontains-all",label:"Contains All (iCase)"},{value:"icontains-any",label:"Contains Any (iCase)"},{value:"starts-with",label:"Starts With"},{value:"regex",label:"Regex"},{value:"levenshtein",label:"Levenshtein Distance"},{value:"is-refusal",label:"Is Refusal"},{value:"is-html",label:"Is HTML"},{value:"contains-html",label:"Contains HTML"},{value:"is-json",label:"Is JSON"},{value:"contains-json",label:"Contains JSON"},{value:"is-xml",label:"Is XML"},{value:"contains-xml",label:"Contains XML"},{value:"is-sql",label:"Is SQL"},{value:"contains-sql",label:"Contains SQL"},{value:"similar",label:"Semantic Similarity"},{value:"rouge-n",label:"ROUGE-N"},{value:"bleu",label:"BLEU"},{value:"gleu",label:"GLEU"},{value:"meteor",label:"METEOR"},{value:"perplexity",label:"Perplexity"},{value:"perplexity-score",label:"Perplexity Score"},{value:"latency",label:"Latency"},{value:"cost",label:"Cost"},{value:"finish-reason",label:"Finish Reason"},{value:"trace-error-spans",label:"Trace Error Spans"},{value:"trace-span-count",label:"Trace Span Count"},{value:"trace-span-duration",label:"Trace Span Duration"},{value:"is-valid-function-call",label:"Is Valid Function Call"},{value:"is-valid-openai-function-call",label:"Is Valid OpenAI Function Call"},{value:"is-valid-openai-tools-call",label:"Is Valid OpenAI Tools Call"},{value:"guardrails",label:"Guardrails"},{value:"javascript",label:"JavaScript (custom)"},{value:"python",label:"Python (custom)"},{value:"webhook",label:"Webhook (custom)"},{value:"pi",label:"Pi Scorer"}],Mr=[...en,...en.map(a=>({value:`not-${a.value}`,label:`Not ${a.label}`}))];let oe=L(Pt([]));const fr=w(()=>{var a;return((a=s.currentStep)==null?void 0:a.name)||"main"}),qe=w(()=>e(oe).filter(a=>a.step===e(fr)||kr(a.step)&&kr(e(fr)))),Cn=w(()=>new Set(s.steps.map(a=>a.name))),tn=w(()=>s.steps.some(a=>kr(a.name))),rn=w(()=>{if(!s.steps.length)return[];const a=new Map;for(const c of e(oe))e(Cn).has(c.step)||e(tn)&&kr(c.step)||a.set(c.step,(a.get(c.step)??0)+1);return[...a.entries()].map(([c,d])=>({step:c,count:d})).sort((c,d)=>c.step.localeCompare(d.step))});let ve=L(!1),sr=L(null),vr=L(null),Ir=L(0),S=L(0),X=L(1),me=L(Pt([])),G=L(Pt([])),ze=L(Pt([]));const $t=w(()=>new Set(e(me))),dt=w(()=>new Set(e(G))),Mt=w(()=>new Set(e(ze)));let Et=!1,he=null,Te=0,xe=Promise.resolve();const Ee=new Set;let Y=L(0);const re=w(()=>e(Y)>0);let ft=L(!1),rt=L(null),nt=L(Pt([]));const ar=w(()=>new Set(e(nt))),_t=w(()=>e(qe).some(a=>e(ar).has(a.id)));function wt(a){return Ee.add(a),i(Y,e(Y)+1),a.finally(()=>{Ee.delete(a),i(Y,e(Y)-1)}),a}function Dt(a,c,d){const p=Array.isArray(d.results)?d.results:[],h=p.reduce((_,y)=>_+(y!=null&&y.success?1:0),0);return{success_rate:d.success_rate,successes:h,total_runs:p.length,isOld:!!d.is_old,previous:d.previous&&typeof d.previous=="object"?{success_count:Number(d.previous.success_count??0),total_runs:Number(d.previous.total_runs??0),report_timestamp:String(d.previous.report_timestamp??"")}:void 0,runs:p.map((_,y)=>{const N=d.report_timestamp,M={agent:a,id:c,timestamp:N,run:y};return{index:y+1,success:!!_.success,text:String(_.result||""),evaluation:String(_.evaluation||""),errors:String(_.errors||""),links:{renderedPrompt:{...M,key:"rendered_prompt"},receivedPrompt:{...M,key:"received_prompt"},conversation:{...M,key:"stringified_conversation"},context:{...M,key:"received_context"},logs:{...M,key:"logs"},errors:{...M,key:"errors"},traces:{...M,key:"traces"}}}}).reverse()}}async function vt(){const a=(e(n)??"").trim();if(a){i(rt,null);try{const[{rows:c,settingsKey:d},p]=await Promise.all([Fe.tests.list.query({agent:a,region:e(l)}),Fe.tests.latestResult.query({agent:a,region:e(l)})]);if((e(n)??"").trim()!==a)return;i(O,d,!0);const h=ae(d);i(C,h.repeats,!0),i($,h.concurrency,!0),i(nt,h.expandedTestIds,!0),i(oe,c.map(_=>{const y=_.id,N=p[y];return{id:y,pinned:String(_.pinned).toUpperCase()==="TRUE",scenario:_.scenario||"",step:String(_.step||"main"),evaluation_mode:_.evaluation_mode==="json-deep-equal"?"json-deep-equal":"assertion",case_sensitive:_.case_sensitive===!0,context_mode:_.context_mode==="replace"?"replace":"merge",author:_.author||"",assertion_type:_.assertion_type||"llm-rubric",assertion_value:_.assertion_value||"",conversation:_.conversation||"",expected_output:_.expected_output||"",conversation_ui:on(_.conversation||"",_.expected_output||"",String(_.step??"main"),_.evaluation_mode==="json-deep-equal"),timeout:Number(_.timeout??0),similarity_threshold:Number(_.similarity_threshold??50),context:JSON.stringify(_.context),mocks:JSON.stringify(_.mocks||{}),hasMocks:typeof _.mocks<"u",result:N?Dt(a,y,N):void 0}}),!0)}catch(c){if(console.error(c),(e(n)??"").trim()!==a)return;const d=c instanceof Error?c.message:String(c);i(rt,{kind:d.includes(v)?"legacy":"other",message:d},!0),i(oe,[],!0),i(C,1),i($,75),i(nt,[],!0)}finally{(e(n)??"").trim()===a&&i(ft,!0)}}}async function nn(a){const c=(e(n)??"").trim();if(c&&!Et){Et=!0;try{const[d,p]=await Promise.all([Fe.tests.latestResult.query({agent:c,region:e(l)}),Fe.tests.runProgress.query({agent:c,region:e(l)})]);if(a!==Te)return;p&&(i(me,p.plannedTestIds,!0),i(G,p.runningTestIds,!0),i(ze,p.completedTestIds,!0));const h=e(oe).map(M=>{const ce=d[M.id];return{...M,result:ce?Dt(c,M.id,ce):void 0}});i(oe,h,!0);const _=e(sr),y=Math.max(1,Number(e(X))||1),N=h.reduce((M,ce)=>e($t).has(ce.id)&&ce.result&&!ce.result.isOld&&ce.result.total_runs>=y?M+1:M,0);i(Ir,N,!0)}catch(d){console.error(d)}finally{Et=!1}}}async function Ys(a){if(e(ve))return;i(ve,!0),i(sr,a,!0),i(vr,null),i(S,a==="all"?e(qe).length:e(qe).filter(d=>d.pinned).length,!0),i(Ir,0),i(X,Math.max(1,Number(e(C))||1),!0),i(me,e(qe).filter(d=>a==="all"||d.pinned).map(d=>d.id),!0),i(G,[],!0),i(ze,[],!0),Te+=1;const c=Te;if(await Promise.all([xe,...Ee]),c===Te){he&&clearInterval(he),he=setInterval(()=>nn(c),250),nn(c);try{await Fe.tests.runTests.mutate({agent:e(n),region:e(l),step:e(fr),scope:a,promptOverrides:o.getPromptOverrides(),repeats:e(C),concurrency:e($)})}catch(d){c===Te&&console.error(d)}finally{if(c!==Te)return;he&&clearInterval(he),he=null;try{await vt()}finally{if(c!==Te)return;i(ve,!1),i(sr,null),i(vr,null),i(me,[],!0),i(G,[],!0),i(ze,[],!0)}}}}async function Zs(a){if(!e(n)||e(ve))return;i(ve,!0),i(sr,"single"),i(vr,a,!0),i(S,1),i(Ir,0),i(X,Math.max(1,Number(e(C))||1),!0),i(me,[a],!0),i(G,[],!0),i(ze,[],!0),Te+=1;const c=Te;if(await Promise.all([xe,...Ee]),c===Te){he&&clearInterval(he),he=setInterval(()=>nn(c),250),nn(c);try{await Fe.tests.runTests.mutate({agent:e(n),region:e(l),testId:a,promptOverrides:o.getPromptOverrides(),repeats:e(C),concurrency:e($)})}catch(d){c===Te&&console.error(d)}finally{if(c!==Te)return;he&&clearInterval(he),he=null;try{await vt()}finally{if(c!==Te)return;i(ve,!1),i(sr,null),i(vr,null),i(me,[],!0),i(G,[],!0),i(ze,[],!0)}}}}function ea(){e(ve)&&(Te+=1,he&&clearInterval(he),he=null,i(ve,!1),i(sr,null),i(vr,null),i(me,[],!0),i(G,[],!0),i(ze,[],!0),xe=Fe.tests.cancelRun.mutate({agent:e(n),region:e(l)}).then(()=>{},()=>{}))}async function ta(a){const c=a?"TRUE":"FALSE",d=e(qe).filter(h=>h.pinned!==a).map(h=>h.id);if(d.length===0)return;const p=new Set(d);i(oe,e(oe).map(h=>p.has(h.id)?{...h,pinned:a}:h),!0);try{await wt(Fe.tests.patchTestsBatch.mutate({agent:e(n),region:e(l),updates:d.map(h=>({id:h,patch:{pinned:c}}))}))}catch(h){console.error(h),await vt()}}let Pn=null,Gn=null;Ar(()=>{const a=(e(n)??"").trim(),c=(e(l)??"").trim(),d=s.availableRegions,p=Array.isArray(d)&&d.length>0;if(!a){Pn=null,i(O,null),i(rt,null),i(oe,[],!0),i(nt,[],!0),i(ft,!1);return}if(p&&!c)return;const h=`${a}::${c}`;Pn!==h&&(Pn=h,i(O,null),i(rt,null),i(oe,[],!0),i(nt,[],!0),i(ft,!1),vt())}),Ar(()=>{const a=(vs.url.searchParams.get("test")||"").trim(),c=(vs.url.searchParams.get("step")||"").trim(),d=e(oe).some(p=>p.id===a&&(!c||p.step===c));!a||!d||Gn===a||(Gn=a,(async()=>{var p;e(ar).has(a)||await Cr(a,!0),await $a(),(p=document.querySelector(`[data-id="${CSS.escape(a)}"]`))==null||p.scrollIntoView({block:"start"})})().catch(console.error))});const sn=w(()=>e(qe).filter(a=>a.pinned).length),Dr=w(()=>e(sn)>0),ra=w(()=>e(qe).length>0&&e(sn)===e(qe).length),pt=w(()=>{let a=0,c=0,d=0,p=0,h=0,_=0,y=0,N=0;for(const ce of e(qe)){const ne=ce.result;!ne||ne.isOld||ne.total_runs<=0||(c+=1,d+=ne.successes,p+=ne.total_runs,ne.successes===ne.total_runs&&(a+=1),ne.previous&&ne.previous.total_runs>0&&(h+=ne.previous.success_count,_+=ne.previous.total_runs,y+=ne.successes,N+=ne.total_runs))}const M=(()=>{if(N<5||_<=0)return null;const ce=Ws(h,_,y,N);if(ce===null||ce>=.05)return null;const ne=h/_;return{direction:y/N>=ne?"higher":"lower",previousAttemptsPassing:h,previousAttemptsTotal:_,currentAttemptsPassing:y,currentAttemptsTotal:N,pValue:ce}})();return{casesPassing:a,casesTotal:c,attemptsPassing:d,attemptsTotal:p,trend:M}});async function na(){var p,h;const a=(h=(p=s.currentStep)==null?void 0:p.schema)!=null&&h.trim()?"json-deep-equal":"assertion",c=await Fe.tests.addTest.mutate({agent:e(n),region:e(l),seed:{step:e(fr),evaluation_mode:a,...a==="json-deep-equal"?{expected_output:"{}",case_sensitive:!1}:{}}}),d=Ln(c);i(oe,[d,...e(oe)],!0),Cr(d.id,!0).catch(console.error)}function Ln(a){return{...a,step:String(a.step||"main"),evaluation_mode:a.evaluation_mode==="json-deep-equal"?"json-deep-equal":"assertion",case_sensitive:a.case_sensitive===!0,context_mode:a.context_mode==="replace"?"replace":"merge",pinned:a.pinned==="TRUE",timeout:Number(a.timeout),similarity_threshold:Number(a.similarity_threshold),context:JSON.stringify(a.context),mocks:JSON.stringify(a.mocks||{}),hasMocks:typeof a.mocks<"u",conversation_ui:on(a.conversation||"",a.expected_output||"",String(a.step||"main"),a.evaluation_mode==="json-deep-equal")}}function sa(a,c){const d=c.test,p=d.id,h=c.results,_=h.reduce((y,N)=>y+(N.success?1:0),0);return{id:p,pinned:d.pinned==="TRUE",scenario:d.scenario,step:d.step||"main",evaluation_mode:d.evaluation_mode==="json-deep-equal"?"json-deep-equal":"assertion",case_sensitive:d.case_sensitive===!0,context_mode:d.context_mode==="replace"?"replace":"merge",author:d.author||"",assertion_type:d.assertion_type,assertion_value:d.assertion_value,conversation:d.conversation,expected_output:d.expected_output,conversation_ui:on(d.conversation||"",d.expected_output||"",d.step||"main",d.evaluation_mode==="json-deep-equal"),timeout:Number(d.timeout),similarity_threshold:Number(d.similarity_threshold),context:JSON.stringify(d.context),mocks:JSON.stringify(d.mocks||{}),hasMocks:typeof d.mocks<"u",result:{success_rate:c.success_rate,successes:_,total_runs:h.length,isOld:!1,runs:h.map((y,N)=>{const M={agent:e(n),id:p,timestamp:a,run:N};return{index:N+1,success:y.success,text:y.result||"",evaluation:y.evaluation||"",errors:y.errors||"",links:{renderedPrompt:{...M,key:"rendered_prompt"},receivedPrompt:{...M,key:"received_prompt"},conversation:{...M,key:"stringified_conversation"},context:{...M,key:"received_context"},logs:{...M,key:"logs"},errors:{...M,key:"errors"},traces:{...M,key:"traces"}}}}).reverse()}}}function aa(a){let c=0,d=0,p=0,h=0;for(const _ of a){const y=_.result;!y||y.total_runs<=0||(d+=1,p+=y.successes,h+=y.total_runs,y.successes===y.total_runs&&(c+=1))}return{casesPassing:c,casesTotal:d,attemptsPassing:p,attemptsTotal:h}}function Kn(a){var c;return((c=Mr.find(d=>d.value===a))==null?void 0:c.label)??a}function Qn(a,c){i($e,!1),o.openAiEdit(oi({context:a.context,conversation:a.conversation,expectedOutput:a.expected_output,assertionLabel:a.evaluation_mode==="json-deep-equal"?"":Kn(a.assertion_type),assertionValue:a.evaluation_mode==="json-deep-equal"?"":a.assertion_value,currentIncorrectOutcome:c}))}function oa(a){const c=new Date(a);return Number.isNaN(c.getTime())?a:c.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function ia(a){const c=new Date(a);return Number.isNaN(c.getTime())?"":c.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}function Wn(a){return a==="all"?"All tests":"Pinned tests"}function la(a){const c=new Set(e(tt));c.has(a)?c.delete(a):c.add(a),i(tt,Array.from(c),!0)}function $n(a,c){return`${a.trim()}::${String(c??"").trim()}`}function pr(){const a=(e(n)??"").trim();return a?$n(a,e(l)):null}function Xn(a){return a.rows.length===1?a.rows.map(c=>c.test.id):[]}function ca(){ur+=1,nr+=1,i(Se,null),i(le,[],!0),i(Lt,!1),i(Xe,null),i(Ke,null),i(Nt,{},!0),i(Qt,!1),i(rr,null),i(tt,[],!0)}async function ua(){const a=pr();a&&(e(Se)!==a&&(ca(),i(Lt,!0)),i($e,!0),await da({preserveCachedDetail:!0}))}async function da(a={}){var _;const c=(e(n)??"").trim();if(!c)return;const d=e(l),p=$n(c,d),h=++ur;i(Lt,!0),i(Xe,null);try{const y=await Fe.tests.historyList.query({agent:c,region:d});if(h!==ur||pr()!==p)return;i(le,y,!0),i(Se,p,!0);const N=e(Ke)&&y.some(M=>M.timestamp===e(Ke))?e(Ke):((_=y[0])==null?void 0:_.timestamp)??null;N?await Yn(N,{preserveCachedDetail:a.preserveCachedDetail,requestKey:p}):(i(Ke,null),i(rr,null),i(Qt,!1),i(tt,[],!0))}catch(y){if(console.error(y),h!==ur||pr()!==p)return;i(Xe,"Failed to load test history"),e(Se)!==p&&(i(le,[],!0),i(Ke,null),i(Nt,{},!0),i(tt,[],!0))}finally{h===ur&&pr()===p&&i(Lt,!1)}}async function Yn(a,c={}){const d=(e(n)??"").trim();if(!d)return;const p=e(l),h=c.requestKey??$n(d,p),_=e(Ke)===a;i(Ke,a,!0),i(Qt,!0),i(rr,null);const y=e(Nt)[a];if(y&&c.preserveCachedDetail){nr+=1,i(Qt,!1),_||i(tt,Xn(y),!0);return}const N=++nr;y||i(tt,[],!0);try{const M=await Fe.tests.historyRun.query({agent:d,region:p,timestamp:a});if(N!==nr||e(Ke)!==a||pr()!==h)return;i(Nt,{...e(Nt),[a]:M},!0),i(tt,Xn(M),!0)}catch(M){if(console.error(M),N!==nr||e(Ke)!==a||pr()!==h)return;i(rr,"Failed to load this test run"),i(tt,[],!0)}finally{N===nr&&e(Ke)===a&&pr()===h&&i(Qt,!1)}}function Zn(a){const{conversation_ui:c,hasMocks:d,mocks:p,result:h,..._}=a,y={..._,pinned:a.pinned?"TRUE":"FALSE",timeout:String(a.timeout??0),similarity_threshold:String(a.similarity_threshold??50),context:JSON.parse(a.context)};return d&&(y.mocks=JSON.parse(p)),y}async function fa(a,c){const d=Zn(a),p=await Fe.tests.addTest.mutate({agent:e(n),region:e(l),seed:d}),h=Ln(p),_=e(oe).slice(),y=e(oe).findIndex(N=>N.id===a.id);_.splice(y<0?c:y,0,h),i(oe,_,!0),Cr(h.id,!0).catch(console.error),await Fe.tests.reorder.mutate({agent:e(n),region:e(l),order:e(oe).map(N=>N.id)})}async function es(a,c,d=0){const p=Zn(a);p.expected_output=c;const h=await Fe.tests.addTest.mutate({agent:e(n),region:e(l),seed:p}),_=Ln(h),y=e(oe).slice();y.splice(d,0,_),i(oe,y,!0),Cr(_.id,!0).catch(console.error),await Fe.tests.reorder.mutate({agent:e(n),region:e(l),order:e(oe).map(N=>N.id)})}function ts(a){if(!a)return"";try{return a.replace(/^\s*\d+\s*[:.)-]?\s*(?:[❌✖️✔✅✗xX])?\s*/u,"")}catch{return a}}function an(a){try{return a&&a.trim()?JSON.parse(a):{}}catch{return{}}}const rs=a=>a.match(/^\s*(agent|assistant|user|system|step)\s*:\s*(.*)$/i);function ns(a){return kr(a)?"agent":"step"}function ss(a){try{const c=JSON.parse(a),d=JSON.stringify(c,null,2);return typeof c!="object"||c===null||Array.isArray(c)?d:d.split(`
|
|
18
|
+
file per test and will not read, modify, or replace the legacy files.</p> <a target="_blank" rel="noreferrer" class="mt-4 inline-flex rounded bg-red-200 px-3 py-2 font-semibold text-red-950 hover:bg-red-100">Open migration guide</a>`,1),ki=I('<p class="mt-2 break-words text-red-200"> </p> <!>',1),Si=I('<div class="flex h-full items-start justify-center overflow-auto p-8"><div role="alert" class="w-full max-w-2xl rounded border border-red-500 bg-red-950/30 p-5 text-red-100"><h2 class="text-xl font-semibold"> </h2> <!></div></div>'),Ti=I("<li> </li>"),Ii=I('<div class="mx-2 mt-2 rounded border border-red-500 bg-red-950/30 px-3 py-2 text-sm text-red-200"><div class="font-semibold">Orphaned tests</div> <ul class="mt-1 list-disc pl-5"></ul></div>'),Ci=I('<div class="mr-3 flex items-center gap-3"><span class="animate-pulse rounded bg-rc-green-200 px-3 py-1 text-white"> </span> <!></div>'),Pi=I("<!> New test",1),Li=I('<div class="pointer-events-none absolute -left-28 top-full mt-4 inline-flex -translate-x-1/2 flex-col items-center"><div class="relative w-50vw max-w-2xl"><img src="/ui/arrow_tests.svg" alt="Arrow" class="block h-auto w-full object-contain"/> <span class="absolute inset-0 mt-48 flex items-center justify-center text-center text-4xl font-extrabold text-rc-gray-200">No tests yet.<br/>Add the first one</span></div></div>'),$i=I("<!> History",1),Ei=I("<!> Collapse all",1),Ri=I("<div></div>"),Ai=I('<button aria-label="Pin/unpin all" title="Pin/unpin all"><!></button>'),Dn=I('<span><!><span class="ml-1"> </span></span>'),ji=I('<div class="translate-y-[5px]"><!></div>'),Oi=I('<button><!></button> <button title="Duplicate" class="icon-btn text-gray-300 hover:text-gray-100 disabled:cursor-not-allowed disabled:opacity-50 svelte-rdft55"><!></button> <button title="Delete" class="icon-btn text-gray-300 hover:text-gray-100 disabled:cursor-not-allowed disabled:opacity-50 svelte-rdft55"><!></button>',1),Ni=I("<span> </span> <!> <!>",1),Mi=I('<div class="rounded bg-rc-gray-930 px-2 py-2 text-sm text-rc-red-600"> </div>'),Di=I("<option> </option>"),Fi=I('<div class="flex items-center gap-2"><select class="rc-scroll rc-input w-36 svelte-rdft55" aria-label="Assertion Type"></select> <input class="rc-input min-w-0 flex-1 svelte-rdft55" type="text" placeholder="Assertion value"/></div>'),qi=I('<label class="inline-flex items-center gap-2 text-sm text-rc-gray-200"><input type="checkbox" class="checkbox"/> <span>Case-sensitive</span></label>'),zi=I('<div class="text-lg font-extrabold"><span> </span> <!> <!></div>'),Ji=I('<div class="mt-3 flex flex-col gap-4"></div>'),Hi=I('<div class="flex flex-col gap-2 p-2"><!> <input class="card-input-subtle svelte-rdft55" type="text" placeholder="Author"/> <!> <div class="flex flex-wrap items-center gap-3"><!> <!></div> <!></div> <div class="rounded-b border-t border-rc-gray-700 bg-rc-gray-980 p-2"><div class="flex flex-wrap items-center gap-3"><!> <!></div> <!></div>',1),Vi=I('<div class="border-b border-rc-gray-700 p-2"><div class="grid grid-cols-[2.25rem,1fr] gap-2"><div class="flex flex-col items-center gap-1"><!></div> <div class="min-w-0"><div><div><div class="grid grid-cols-[1fr,2.25rem] items-center gap-2"><input class="card-input-title svelte-rdft55" type="text" placeholder="Scenario"/> <button class="icon-btn justify-self-end text-gray-300 hover:text-gray-100 disabled:cursor-not-allowed disabled:opacity-50 svelte-rdft55"><!></button></div> <!></div> <!></div></div></div></div>'),Ui=I("<!> <!>",1),Bi=I('<div class="flex min-h-0 flex-1 flex-col overflow-hidden p-3"><!> <div class="mt-3 min-h-0 flex-1 overflow-hidden"><!></div></div>'),Gi=I('<div class="rc-scroll min-h-0 flex-1 overflow-auto"><div class="grid grid-cols-[2.25rem,1fr] items-center gap-2 border-b border-rc-gray-700 p-2"><!> <div class="flex flex-wrap items-center gap-x-4 gap-y-1 text-left text-rc-gray-300"><span> </span> <span> </span> <span> </span> <!></div></div> <!></div> <!>',1),Ki=I('<div class="flex h-full min-h-0 flex-col"><!> <div class="flex flex-none items-center justify-between gap-3 p-2"><div class="flex flex-wrap items-center gap-3 pl-11"><div class="flex items-center gap-2"><label class="text-rc-gray-300">Repeats</label> <!></div> <div class="flex items-center gap-2"><label class="text-rc-gray-300">Concurrency</label> <!></div></div> <div class="flex flex-wrap items-center gap-3"><!> <div class="relative inline-flex items-center"><!> <!></div> <!></div></div> <div class="flex flex-none items-center justify-between gap-3 px-2 pb-2"><!> <!></div> <div class="min-h-0 flex-1 overflow-hidden"><!></div></div>'),Qi=I("<!> <!> <!>",1);function wl(t,r){kn(r,!0);const{state:s,actions:o}=ja(),n=w(()=>s.agentId),l=w(()=>s.region),v="BOSUN_LEGACY_TEST_SUITE:",b="https://github.com/recombine-ai/bosun/blob/main/TESTS_MIGRATION.md";function k(a){try{return structuredClone(a)}catch{try{return JSON.parse(JSON.stringify(a))}catch{return a}}}function T(a,c,d){return Math.max(c,Math.min(d,a))}let C=L(1),$=L(75),O=L(null);function ae(a){if(typeof localStorage>"u")return{repeats:1,concurrency:75,expandedTestIds:[]};try{const c=JSON.parse(localStorage.getItem(a)||"{}");return{repeats:T(Number(c.repeats)||1,1,500),concurrency:T(Number(c.concurrency)||75,1,75),expandedTestIds:Array.isArray(c.expandedTestIds)?c.expandedTestIds.filter(d=>typeof d=="string"):[]}}catch{return{repeats:1,concurrency:75,expandedTestIds:[]}}}function K(){!e(O)||typeof localStorage>"u"||localStorage.setItem(e(O),JSON.stringify({repeats:e(C),concurrency:e($),expandedTestIds:e(nt)}))}let R=L(null),A=L("context"),P=L(Pt({})),D=L(Pt({})),V=L(!1),B=L(!1),fe=L(!1),E=L(""),Q=L(null),$e=L(!1),Se=L(null),le=L(Pt([])),Lt=L(!1),Xe=L(null),Ke=L(null),Nt=L(Pt({})),Qt=L(!1),rr=L(null),tt=L(Pt([])),ur=0,nr=0;const ut=w(()=>e(Ke)?e(Nt)[e(Ke)]??null:null),Yr=w(()=>e(Lt)&&e(le).length===0&&!e(Xe)),Zr=w(()=>e(Qt)&&!e(ut)),Or=w(()=>new Set(e(tt))),Sr=w(()=>e(ut)?e(ut).rows.map(a=>sa(e(ut).timestamp,a)):[]),Tr=w(()=>aa(e(Sr)));function Wt(a,c){i(E,a,!0),i(Q,JSON.stringify(c??{},null,2),!0),i(fe,!0)}let dr=L(!1);async function Nr(a,c,d){var _;if(e(dr))return;i(dr,!0);const p=o.openPopover("analyze"),h=`Analysis — ${a} (run ${c})`;try{const y=await Fe.tests.analyzeRun.mutate({agent:d.agent,region:e(l),testId:d.id,index:d.run,timestamp:d.timestamp});if(((_=s.edit.popover)==null?void 0:_.requestId)!==p)return;o.setHighlightQuotes(y.quotes);let N=null;try{N=JSON.stringify(y.raw,null,2)}catch{N=null}o.setPopoverReady(p,{title:h,quotes:y.quotes,rationales:y.rationales,parallelCalls:y.parallelCalls,raw:N})}catch(y){console.error(y);const N=typeof(y==null?void 0:y.message)=="string"?y.message:(()=>{try{return JSON.stringify(y)}catch{return String(y)}})();o.setPopoverError(p,N||"Failed to analyze this response",{raw:N})}finally{i(dr,!1)}}const en=[{value:"llm-rubric",label:"LLM"},{value:"answer-relevance",label:"Answer Relevance (LLM)"},{value:"context-faithfulness",label:"Context Faithfulness (LLM)"},{value:"context-recall",label:"Context Recall (LLM)"},{value:"context-relevance",label:"Context Relevance (LLM)"},{value:"model-graded-closedqa",label:"Model-Graded Closed QA"},{value:"model-graded-factuality",label:"Model-Graded Factuality"},{value:"moderation",label:"Moderation"},{value:"classifier",label:"Classifier"},{value:"g-eval",label:"G-Eval"},{value:"factuality",label:"Factuality"},{value:"conversation-relevance",label:"Conversation Relevance"},{value:"equals",label:"Equals"},{value:"contains",label:"Contains"},{value:"icontains",label:"Contains (case-insensitive)"},{value:"contains-all",label:"Contains All"},{value:"contains-any",label:"Contains Any"},{value:"icontains-all",label:"Contains All (iCase)"},{value:"icontains-any",label:"Contains Any (iCase)"},{value:"starts-with",label:"Starts With"},{value:"regex",label:"Regex"},{value:"levenshtein",label:"Levenshtein Distance"},{value:"is-refusal",label:"Is Refusal"},{value:"is-html",label:"Is HTML"},{value:"contains-html",label:"Contains HTML"},{value:"is-json",label:"Is JSON"},{value:"contains-json",label:"Contains JSON"},{value:"is-xml",label:"Is XML"},{value:"contains-xml",label:"Contains XML"},{value:"is-sql",label:"Is SQL"},{value:"contains-sql",label:"Contains SQL"},{value:"similar",label:"Semantic Similarity"},{value:"rouge-n",label:"ROUGE-N"},{value:"bleu",label:"BLEU"},{value:"gleu",label:"GLEU"},{value:"meteor",label:"METEOR"},{value:"perplexity",label:"Perplexity"},{value:"perplexity-score",label:"Perplexity Score"},{value:"latency",label:"Latency"},{value:"cost",label:"Cost"},{value:"finish-reason",label:"Finish Reason"},{value:"trace-error-spans",label:"Trace Error Spans"},{value:"trace-span-count",label:"Trace Span Count"},{value:"trace-span-duration",label:"Trace Span Duration"},{value:"is-valid-function-call",label:"Is Valid Function Call"},{value:"is-valid-openai-function-call",label:"Is Valid OpenAI Function Call"},{value:"is-valid-openai-tools-call",label:"Is Valid OpenAI Tools Call"},{value:"guardrails",label:"Guardrails"},{value:"javascript",label:"JavaScript (custom)"},{value:"python",label:"Python (custom)"},{value:"webhook",label:"Webhook (custom)"},{value:"pi",label:"Pi Scorer"}],Mr=[...en,...en.map(a=>({value:`not-${a.value}`,label:`Not ${a.label}`}))];let oe=L(Pt([]));const fr=w(()=>{var a;return((a=s.currentStep)==null?void 0:a.name)||"main"}),qe=w(()=>e(oe).filter(a=>a.step===e(fr)||kr(a.step)&&kr(e(fr)))),Cn=w(()=>new Set(s.steps.map(a=>a.name))),tn=w(()=>s.steps.some(a=>kr(a.name))),rn=w(()=>{if(!s.steps.length)return[];const a=new Map;for(const c of e(oe))e(Cn).has(c.step)||e(tn)&&kr(c.step)||a.set(c.step,(a.get(c.step)??0)+1);return[...a.entries()].map(([c,d])=>({step:c,count:d})).sort((c,d)=>c.step.localeCompare(d.step))});let ve=L(!1),sr=L(null),vr=L(null),Ir=L(0),S=L(0),X=L(1),me=L(Pt([])),G=L(Pt([])),ze=L(Pt([]));const $t=w(()=>new Set(e(me))),dt=w(()=>new Set(e(G))),Mt=w(()=>new Set(e(ze)));let Et=!1,he=null,Te=0,xe=Promise.resolve();const Ee=new Set;let Y=L(0);const re=w(()=>e(Y)>0);let ft=L(!1),rt=L(null),nt=L(Pt([]));const ar=w(()=>new Set(e(nt))),_t=w(()=>e(qe).some(a=>e(ar).has(a.id)));function wt(a){return Ee.add(a),i(Y,e(Y)+1),a.finally(()=>{Ee.delete(a),i(Y,e(Y)-1)}),a}function Dt(a,c,d){const p=Array.isArray(d.results)?d.results:[],h=p.reduce((_,y)=>_+(y!=null&&y.success?1:0),0);return{success_rate:d.success_rate,successes:h,total_runs:p.length,isOld:!!d.is_old,previous:d.previous&&typeof d.previous=="object"?{success_count:Number(d.previous.success_count??0),total_runs:Number(d.previous.total_runs??0),report_timestamp:String(d.previous.report_timestamp??"")}:void 0,runs:p.map((_,y)=>{const N=d.report_timestamp,M={agent:a,id:c,timestamp:N,run:y};return{index:y+1,success:!!_.success,text:String(_.result||""),evaluation:String(_.evaluation||""),errors:String(_.errors||""),links:{renderedPrompt:{...M,key:"rendered_prompt"},receivedPrompt:{...M,key:"received_prompt"},conversation:{...M,key:"stringified_conversation"},context:{...M,key:"received_context"},logs:{...M,key:"logs"},errors:{...M,key:"errors"},traces:{...M,key:"traces"}}}}).reverse()}}async function vt(){const a=(e(n)??"").trim();if(a){i(rt,null);try{const[{rows:c,settingsKey:d},p]=await Promise.all([Fe.tests.list.query({agent:a,region:e(l)}),Fe.tests.latestResult.query({agent:a,region:e(l)})]);if((e(n)??"").trim()!==a)return;i(O,d,!0);const h=ae(d);i(C,h.repeats,!0),i($,h.concurrency,!0),i(nt,h.expandedTestIds,!0),i(oe,c.map(_=>{const y=_.id,N=p[y];return{id:y,pinned:String(_.pinned).toUpperCase()==="TRUE",scenario:_.scenario||"",step:String(_.step||"main"),evaluation_mode:_.evaluation_mode==="json-deep-equal"?"json-deep-equal":"assertion",case_sensitive:_.case_sensitive===!0,context_mode:_.context_mode==="replace"?"replace":"merge",author:_.author||"",assertion_type:_.assertion_type||"llm-rubric",assertion_value:_.assertion_value||"",conversation:_.conversation||"",expected_output:_.expected_output||"",conversation_ui:on(_.conversation||"",_.expected_output||"",String(_.step??"main"),_.evaluation_mode==="json-deep-equal"),timeout:Number(_.timeout??0),similarity_threshold:Number(_.similarity_threshold??50),context:JSON.stringify(_.context),mocks:JSON.stringify(_.mocks||{}),hasMocks:typeof _.mocks<"u",result:N?Dt(a,y,N):void 0}}),!0)}catch(c){if(console.error(c),(e(n)??"").trim()!==a)return;const d=c instanceof Error?c.message:String(c);i(rt,{kind:d.includes(v)?"legacy":"other",message:d},!0),i(oe,[],!0),i(C,1),i($,75),i(nt,[],!0)}finally{(e(n)??"").trim()===a&&i(ft,!0)}}}async function nn(a){const c=(e(n)??"").trim();if(c&&!Et){Et=!0;try{const[d,p]=await Promise.all([Fe.tests.latestResult.query({agent:c,region:e(l)}),Fe.tests.runProgress.query({agent:c,region:e(l)})]);if(a!==Te)return;p&&(i(me,p.plannedTestIds,!0),i(G,p.runningTestIds,!0),i(ze,p.completedTestIds,!0));const h=e(oe).map(M=>{const ce=d[M.id];return{...M,result:ce?Dt(c,M.id,ce):void 0}});i(oe,h,!0);const _=e(sr),y=Math.max(1,Number(e(X))||1),N=h.reduce((M,ce)=>e($t).has(ce.id)&&ce.result&&!ce.result.isOld&&ce.result.total_runs>=y?M+1:M,0);i(Ir,N,!0)}catch(d){console.error(d)}finally{Et=!1}}}async function Ys(a){if(e(ve))return;i(ve,!0),i(sr,a,!0),i(vr,null),i(S,a==="all"?e(qe).length:e(qe).filter(d=>d.pinned).length,!0),i(Ir,0),i(X,Math.max(1,Number(e(C))||1),!0),i(me,e(qe).filter(d=>a==="all"||d.pinned).map(d=>d.id),!0),i(G,[],!0),i(ze,[],!0),Te+=1;const c=Te;if(await Promise.all([xe,...Ee]),c===Te){he&&clearInterval(he),he=setInterval(()=>nn(c),250),nn(c);try{await Fe.tests.runTests.mutate({agent:e(n),region:e(l),step:e(fr),scope:a,promptOverrides:o.getPromptOverrides(),repeats:e(C),concurrency:e($)})}catch(d){c===Te&&console.error(d)}finally{if(c!==Te)return;he&&clearInterval(he),he=null;try{await vt()}finally{if(c!==Te)return;i(ve,!1),i(sr,null),i(vr,null),i(me,[],!0),i(G,[],!0),i(ze,[],!0)}}}}async function Zs(a){if(!e(n)||e(ve))return;i(ve,!0),i(sr,"single"),i(vr,a,!0),i(S,1),i(Ir,0),i(X,Math.max(1,Number(e(C))||1),!0),i(me,[a],!0),i(G,[],!0),i(ze,[],!0),Te+=1;const c=Te;if(await Promise.all([xe,...Ee]),c===Te){he&&clearInterval(he),he=setInterval(()=>nn(c),250),nn(c);try{await Fe.tests.runTests.mutate({agent:e(n),region:e(l),testId:a,promptOverrides:o.getPromptOverrides(),repeats:e(C),concurrency:e($)})}catch(d){c===Te&&console.error(d)}finally{if(c!==Te)return;he&&clearInterval(he),he=null;try{await vt()}finally{if(c!==Te)return;i(ve,!1),i(sr,null),i(vr,null),i(me,[],!0),i(G,[],!0),i(ze,[],!0)}}}}function ea(){e(ve)&&(Te+=1,he&&clearInterval(he),he=null,i(ve,!1),i(sr,null),i(vr,null),i(me,[],!0),i(G,[],!0),i(ze,[],!0),xe=Fe.tests.cancelRun.mutate({agent:e(n),region:e(l)}).then(()=>{},()=>{}))}async function ta(a){const c=a?"TRUE":"FALSE",d=e(qe).filter(h=>h.pinned!==a).map(h=>h.id);if(d.length===0)return;const p=new Set(d);i(oe,e(oe).map(h=>p.has(h.id)?{...h,pinned:a}:h),!0);try{await wt(Fe.tests.patchTestsBatch.mutate({agent:e(n),region:e(l),updates:d.map(h=>({id:h,patch:{pinned:c}}))}))}catch(h){console.error(h),await vt()}}let Pn=null,Gn=null;Ar(()=>{const a=(e(n)??"").trim(),c=(e(l)??"").trim(),d=s.availableRegions,p=Array.isArray(d)&&d.length>0;if(!a){Pn=null,i(O,null),i(rt,null),i(oe,[],!0),i(nt,[],!0),i(ft,!1);return}if(p&&!c)return;const h=`${a}::${c}`;Pn!==h&&(Pn=h,i(O,null),i(rt,null),i(oe,[],!0),i(nt,[],!0),i(ft,!1),vt())}),Ar(()=>{const a=(vs.url.searchParams.get("test")||"").trim(),c=(vs.url.searchParams.get("step")||"").trim(),d=e(oe).some(p=>p.id===a&&(!c||p.step===c));!a||!d||Gn===a||(Gn=a,(async()=>{var p;e(ar).has(a)||await Cr(a,!0),await $a(),(p=document.querySelector(`[data-id="${CSS.escape(a)}"]`))==null||p.scrollIntoView({block:"start"})})().catch(console.error))});const sn=w(()=>e(qe).filter(a=>a.pinned).length),Dr=w(()=>e(sn)>0),ra=w(()=>e(qe).length>0&&e(sn)===e(qe).length),pt=w(()=>{let a=0,c=0,d=0,p=0,h=0,_=0,y=0,N=0;for(const ce of e(qe)){const ne=ce.result;!ne||ne.isOld||ne.total_runs<=0||(c+=1,d+=ne.successes,p+=ne.total_runs,ne.successes===ne.total_runs&&(a+=1),ne.previous&&ne.previous.total_runs>0&&(h+=ne.previous.success_count,_+=ne.previous.total_runs,y+=ne.successes,N+=ne.total_runs))}const M=(()=>{if(N<5||_<=0)return null;const ce=Ws(h,_,y,N);if(ce===null||ce>=.05)return null;const ne=h/_;return{direction:y/N>=ne?"higher":"lower",previousAttemptsPassing:h,previousAttemptsTotal:_,currentAttemptsPassing:y,currentAttemptsTotal:N,pValue:ce}})();return{casesPassing:a,casesTotal:c,attemptsPassing:d,attemptsTotal:p,trend:M}});async function na(){var p,h;const a=(h=(p=s.currentStep)==null?void 0:p.schema)!=null&&h.trim()?"json-deep-equal":"assertion",c=await Fe.tests.addTest.mutate({agent:e(n),region:e(l),seed:{step:e(fr),evaluation_mode:a,...a==="json-deep-equal"?{expected_output:"{}",case_sensitive:!1}:{}}}),d=Ln(c);i(oe,[d,...e(oe)],!0),Cr(d.id,!0).catch(console.error)}function Ln(a){return{...a,step:String(a.step||"main"),evaluation_mode:a.evaluation_mode==="json-deep-equal"?"json-deep-equal":"assertion",case_sensitive:a.case_sensitive===!0,context_mode:a.context_mode==="replace"?"replace":"merge",pinned:a.pinned==="TRUE",timeout:Number(a.timeout),similarity_threshold:Number(a.similarity_threshold),context:JSON.stringify(a.context),mocks:JSON.stringify(a.mocks||{}),hasMocks:typeof a.mocks<"u",conversation_ui:on(a.conversation||"",a.expected_output||"",String(a.step||"main"),a.evaluation_mode==="json-deep-equal")}}function sa(a,c){const d=c.test,p=d.id,h=c.results,_=h.reduce((y,N)=>y+(N.success?1:0),0);return{id:p,pinned:d.pinned==="TRUE",scenario:d.scenario,step:d.step||"main",evaluation_mode:d.evaluation_mode==="json-deep-equal"?"json-deep-equal":"assertion",case_sensitive:d.case_sensitive===!0,context_mode:d.context_mode==="replace"?"replace":"merge",author:d.author||"",assertion_type:d.assertion_type,assertion_value:d.assertion_value,conversation:d.conversation,expected_output:d.expected_output,conversation_ui:on(d.conversation||"",d.expected_output||"",d.step||"main",d.evaluation_mode==="json-deep-equal"),timeout:Number(d.timeout),similarity_threshold:Number(d.similarity_threshold),context:JSON.stringify(d.context),mocks:JSON.stringify(d.mocks||{}),hasMocks:typeof d.mocks<"u",result:{success_rate:c.success_rate,successes:_,total_runs:h.length,isOld:!1,runs:h.map((y,N)=>{const M={agent:e(n),id:p,timestamp:a,run:N};return{index:N+1,success:y.success,text:y.result||"",evaluation:y.evaluation||"",errors:y.errors||"",links:{renderedPrompt:{...M,key:"rendered_prompt"},receivedPrompt:{...M,key:"received_prompt"},conversation:{...M,key:"stringified_conversation"},context:{...M,key:"received_context"},logs:{...M,key:"logs"},errors:{...M,key:"errors"},traces:{...M,key:"traces"}}}}).reverse()}}}function aa(a){let c=0,d=0,p=0,h=0;for(const _ of a){const y=_.result;!y||y.total_runs<=0||(d+=1,p+=y.successes,h+=y.total_runs,y.successes===y.total_runs&&(c+=1))}return{casesPassing:c,casesTotal:d,attemptsPassing:p,attemptsTotal:h}}function Kn(a){var c;return((c=Mr.find(d=>d.value===a))==null?void 0:c.label)??a}function Qn(a,c){i($e,!1),o.openAiEdit(oi({context:a.context,conversation:a.conversation,expectedOutput:a.expected_output,assertionLabel:a.evaluation_mode==="json-deep-equal"?"":Kn(a.assertion_type),assertionValue:a.evaluation_mode==="json-deep-equal"?"":a.assertion_value,currentIncorrectOutcome:c}))}function oa(a){const c=new Date(a);return Number.isNaN(c.getTime())?a:c.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function ia(a){const c=new Date(a);return Number.isNaN(c.getTime())?"":c.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}function Wn(a){return a==="all"?"All tests":"Pinned tests"}function la(a){const c=new Set(e(tt));c.has(a)?c.delete(a):c.add(a),i(tt,Array.from(c),!0)}function $n(a,c){return`${a.trim()}::${String(c??"").trim()}`}function pr(){const a=(e(n)??"").trim();return a?$n(a,e(l)):null}function Xn(a){return a.rows.length===1?a.rows.map(c=>c.test.id):[]}function ca(){ur+=1,nr+=1,i(Se,null),i(le,[],!0),i(Lt,!1),i(Xe,null),i(Ke,null),i(Nt,{},!0),i(Qt,!1),i(rr,null),i(tt,[],!0)}async function ua(){const a=pr();a&&(e(Se)!==a&&(ca(),i(Lt,!0)),i($e,!0),await da({preserveCachedDetail:!0}))}async function da(a={}){var _;const c=(e(n)??"").trim();if(!c)return;const d=e(l),p=$n(c,d),h=++ur;i(Lt,!0),i(Xe,null);try{const y=await Fe.tests.historyList.query({agent:c,region:d});if(h!==ur||pr()!==p)return;i(le,y,!0),i(Se,p,!0);const N=e(Ke)&&y.some(M=>M.timestamp===e(Ke))?e(Ke):((_=y[0])==null?void 0:_.timestamp)??null;N?await Yn(N,{preserveCachedDetail:a.preserveCachedDetail,requestKey:p}):(i(Ke,null),i(rr,null),i(Qt,!1),i(tt,[],!0))}catch(y){if(console.error(y),h!==ur||pr()!==p)return;i(Xe,"Failed to load test history"),e(Se)!==p&&(i(le,[],!0),i(Ke,null),i(Nt,{},!0),i(tt,[],!0))}finally{h===ur&&pr()===p&&i(Lt,!1)}}async function Yn(a,c={}){const d=(e(n)??"").trim();if(!d)return;const p=e(l),h=c.requestKey??$n(d,p),_=e(Ke)===a;i(Ke,a,!0),i(Qt,!0),i(rr,null);const y=e(Nt)[a];if(y&&c.preserveCachedDetail){nr+=1,i(Qt,!1),_||i(tt,Xn(y),!0);return}const N=++nr;y||i(tt,[],!0);try{const M=await Fe.tests.historyRun.query({agent:d,region:p,timestamp:a});if(N!==nr||e(Ke)!==a||pr()!==h)return;i(Nt,{...e(Nt),[a]:M},!0),i(tt,Xn(M),!0)}catch(M){if(console.error(M),N!==nr||e(Ke)!==a||pr()!==h)return;i(rr,"Failed to load this test run"),i(tt,[],!0)}finally{N===nr&&e(Ke)===a&&pr()===h&&i(Qt,!1)}}function Zn(a){const{conversation_ui:c,hasMocks:d,mocks:p,result:h,..._}=a,y={..._,pinned:a.pinned?"TRUE":"FALSE",timeout:String(a.timeout??0),similarity_threshold:String(a.similarity_threshold??50),context:JSON.parse(a.context)};return d&&(y.mocks=JSON.parse(p)),y}async function fa(a,c){const d=Zn(a),p=await Fe.tests.addTest.mutate({agent:e(n),region:e(l),seed:d}),h=Ln(p),_=e(oe).slice(),y=e(oe).findIndex(N=>N.id===a.id);_.splice(y<0?c:y,0,h),i(oe,_,!0),Cr(h.id,!0).catch(console.error),await Fe.tests.reorder.mutate({agent:e(n),region:e(l),order:e(oe).map(N=>N.id)})}async function es(a,c,d=0){const p=Zn(a);p.expected_output=c;const h=await Fe.tests.addTest.mutate({agent:e(n),region:e(l),seed:p}),_=Ln(h),y=e(oe).slice();y.splice(d,0,_),i(oe,y,!0),Cr(_.id,!0).catch(console.error),await Fe.tests.reorder.mutate({agent:e(n),region:e(l),order:e(oe).map(N=>N.id)})}function ts(a){if(!a)return"";try{return a.replace(/^\s*\d+\s*[:.)-]?\s*(?:[❌✖️✔✅✗xX])?\s*/u,"")}catch{return a}}function an(a){try{return a&&a.trim()?JSON.parse(a):{}}catch{return{}}}const rs=a=>a.match(/^\s*(agent|assistant|user|system|step)\s*:\s*(.*)$/i);function ns(a){return kr(a)?"agent":"step"}function ss(a){try{const c=JSON.parse(a),d=JSON.stringify(c,null,2);return typeof c!="object"||c===null||Array.isArray(c)?d:d.split(`
|
|
19
19
|
`).slice(1,-1).map(p=>p.startsWith(" ")?p.slice(2):p).join(`
|
|
20
20
|
`)}catch{return a}}function as(a,c,d){const p=String(a||c||"—");return d?ss(p):p}function va(a,c,d){let p=String(a??"").trimEnd();if(!p)return"";d&&(p=ss(p));const h=ns(c)==="agent"?"Agent":"Step";return d?p?`${h}:
|
|
21
21
|
${p}`:`${h}:`:`${h}: ${p}`}function on(a,c,d,p){const h=String(a??"").trimEnd(),_=va(c,d,p);return _?h?`${h}
|
|
@@ -23,13 +23,13 @@ ${_}`:_:h}function En(a,c){const d=String(a??""),p=d.split(/\r?\n/),h=[];let _=n
|
|
|
23
23
|
`).trimEnd();let Xt=kt,Z=!0;if(c.evaluation_mode==="json-deep-equal"){const ye=/^\s*[\[{]/.test(kt)?kt:`{
|
|
24
24
|
${kt}
|
|
25
25
|
}`;try{const Ye=JSON.parse(ye);Z=typeof Ye=="object"&&Ye!==null,Xt=Z?JSON.stringify(Ye,null,2):ye}catch{Z=!1,Xt=ye}}const pe=p.slice(0,y.startLine-1).join(`
|
|
26
|
-
`).trimEnd();return{valid:Z,expected:Xt,conversation:pe,highlight:{startLine:c.evaluation_mode==="json-deep-equal"?Math.min(y.endLine,y.startLine+1):y.startLine,endLine:y.endLine}}}function ln(a){return a.total_runs>0&&a.successes<a.total_runs?"text-rc-red-600":"text-rc-gray-200"}async function or(a,c){await Fe.tests.patchTest.mutate({agent:e(n),region:e(l),id:a,patch:c})}async function pa(a){await Fe.tests.deleteTest.mutate({agent:e(n),region:e(l),id:a});try{await Cr(a,!1)}catch(c){console.error(c)}await vt()}function Cr(a,c){if(!(e(n)??"").trim())return Promise.resolve();const p=String(a??"").trim();if(!p)return Promise.resolve();const h=new Set(e(nt)),_=h.has(p);if(c===_)return Promise.resolve();c?h.add(p):h.delete(p);const y=Array.from(h);return i(nt,y,!0),K(),Promise.resolve()}function ga(a){Cr(a,!e(ar).has(a)).catch(console.error)}function ma(){return!(e(n)??"").trim()||!e(_t)||(i(nt,[],!0),K()),Promise.resolve()}function ha(a){e(n)&&(i(R,a.id,!0),i(A,"context"),i(P,k(an(a.context)),!0),i(D,k(an(a.mocks)),!0),i(V,!1),i(B,a.hasMocks,!0))}async function xa(){const a=e(R);if(!a||!e(n)){i(R,null),i(A,"context"),i(V,!1),i(B,!1);return}const c=k(e(P)),d=k(e(D)),p=e(B)||e(V);i(R,null),i(A,"context"),i(V,!1),i(B,!1),i(oe,e(oe).map(h=>{if(h.id!==a)return h;const _={...h,context:JSON.stringify(c)};return p&&(_.mocks=JSON.stringify(d),_.hasMocks=!0),_}),!0);try{const h={context:c};p&&(h.mocks=d),await wt(or(a,h))}catch(h){console.error(h),await vt()}}wn(()=>{he&&clearInterval(he)});var os=Qi();
|
|
26
|
+
`).trimEnd();return{valid:Z,expected:Xt,conversation:pe,highlight:{startLine:c.evaluation_mode==="json-deep-equal"?Math.min(y.endLine,y.startLine+1):y.startLine,endLine:y.endLine}}}function ln(a){return a.total_runs>0&&a.successes<a.total_runs?"text-rc-red-600":"text-rc-gray-200"}async function or(a,c){await Fe.tests.patchTest.mutate({agent:e(n),region:e(l),id:a,patch:c})}async function pa(a){await Fe.tests.deleteTest.mutate({agent:e(n),region:e(l),id:a});try{await Cr(a,!1)}catch(c){console.error(c)}await vt()}function Cr(a,c){if(!(e(n)??"").trim())return Promise.resolve();const p=String(a??"").trim();if(!p)return Promise.resolve();const h=new Set(e(nt)),_=h.has(p);if(c===_)return Promise.resolve();c?h.add(p):h.delete(p);const y=Array.from(h);return i(nt,y,!0),K(),Promise.resolve()}function ga(a){Cr(a,!e(ar).has(a)).catch(console.error)}function ma(){return!(e(n)??"").trim()||!e(_t)||(i(nt,[],!0),K()),Promise.resolve()}function ha(a){e(n)&&(i(R,a.id,!0),i(A,"context"),i(P,k(an(a.context)),!0),i(D,k(an(a.mocks)),!0),i(V,!1),i(B,a.hasMocks,!0))}async function xa(){const a=e(R);if(!a||!e(n)){i(R,null),i(A,"context"),i(V,!1),i(B,!1);return}const c=k(e(P)),d=k(e(D)),p=e(B)||e(V);i(R,null),i(A,"context"),i(V,!1),i(B,!1),i(oe,e(oe).map(h=>{if(h.id!==a)return h;const _={...h,context:JSON.stringify(c)};return p&&(_.mocks=JSON.stringify(d),_.hasMocks=!0),_}),!0);try{const h={context:c};p&&(h.mocks=d),await wt(or(a,h))}catch(h){console.error(h),await vt()}}wn(()=>{he&&clearInterval(he)});var os=Qi();Ea("rdft55",a=>{var c=ci();g(a,c)});var is=Le(os);Qr(is,{title:"Test history",class:"!w-[95vw] !max-w-[90rem]",get open(){return e($e)},set open(d){i($e,d,!0)},children:d=>{var p=yi(),h=f(p),_=f(h);{var y=Z=>{var pe=$s();g(Z,pe)},N=Z=>{var pe=Es(),ye=f(pe,!0);u(pe),H(()=>q(ye,e(Xe))),g(Z,pe)},M=Z=>{var pe=ui();g(Z,pe)},ce=Z=>{var pe=vi(),ye=f(pe);{var Ye=St=>{var Ie=di(),gr=f(Ie,!0);u(Ie),H(()=>q(gr,e(Xe))),g(St,Ie)};j(ye,St=>{e(Xe)&&St(Ye)})}var Rt=m(ye,2);cr(Rt,17,()=>e(le),St=>St.timestamp,(St,Ie,gr,Fr)=>{var U=fi(),ue=f(U),Ce=f(ue),be=f(Ce,!0);u(Ce);var Re=m(Ce,2),Ze=f(Re,!0);u(Re),u(ue);var qt=m(ue,2),mr=f(qt);u(qt);var hr=m(qt,2),zt=f(hr),Tt=f(zt,!0);u(zt);var It=m(zt,2),xr=f(It);u(It),u(hr),u(U),H((z,ir,Jt)=>{Oe(U,1,`w-full rounded border px-3 py-2 text-left transition-colors ${e(Ke)===e(Ie).timestamp?"border-rc-green-200 bg-rc-gray-930 text-rc-gray-100":"border-rc-gray-700 bg-rc-gray-900 text-rc-gray-300 hover:border-rc-gray-500 hover:bg-rc-gray-800"}`,"svelte-rdft55"),q(be,z),q(Ze,ir),q(mr,`${e(Ie).testCount??""}
|
|
27
27
|
${e(Ie).testCount===1?"test":"tests"} · ${Jt??""}`),Oe(zt,1,Ur(e(Ie).passed?"text-rc-green-200":"text-rc-red-600")),q(Tt,e(Ie).passed?"Success":"Failure"),q(xr,`${e(Ie).successRatePercent??""}% (${e(Ie).successRate??""})`)},[()=>oa(e(Ie).timestamp),()=>ia(e(Ie).timestamp),()=>Wn(e(Ie).runScope)]),Me("click",U,()=>void Yn(e(Ie).timestamp,{preserveCachedDetail:!0})),g(St,U)}),u(pe),g(Z,pe)};j(_,Z=>{e(Yr)?Z(y):e(Xe)&&e(le).length===0?Z(N,1):e(le).length===0?Z(M,2):Z(ce,-1)})}u(h);var ne=m(h,2),Ft=f(ne);{var Pr=Z=>{var pe=$s();g(Z,pe)},kt=Z=>{var pe=Es(),ye=f(pe,!0);u(pe),H(()=>q(ye,e(rr))),g(Z,pe)},Xt=Z=>{var pe=bi(),ye=f(pe),Ye=f(ye),Rt=f(Ye),St=m(f(Rt),2);gn(St,{type:"number",class:"w-16",get value(){return e(ut).runConfig.repeats},disabled:!0}),u(Rt);var Ie=m(Rt,2),gr=m(f(Ie),2);gn(gr,{type:"number",class:"w-16",get value(){return e(ut).runConfig.concurrency},disabled:!0}),u(Ie);var Fr=m(Ie,2),U=f(Fr,!0);u(Fr),u(Ye),u(ye);var ue=m(ye,2),Ce=m(f(ue),2),be=f(Ce),Re=f(be);u(be);var Ze=m(be,2),qt=f(Ze);u(Ze),u(Ce),u(ue);var mr=m(ue,2);{var hr=Tt=>{var It=Rs();g(Tt,It)},zt=Tt=>{var It=Ns();cr(It,21,()=>e(Sr),xr=>xr.id,(xr,z)=>{const ir=w(()=>En(e(z).conversation_ui,e(z))),Jt=w(()=>e(Or).has(e(z).id));var Lr=xi(),cn=f(Lr),qr=f(cn),Rn=f(qr);{let Ue=w(()=>`block ${e(z).pinned?"text-rc-green-200":"text-gray-400"}`),Ct=w(()=>e(z).pinned?"mdi:pin":"mdi:pin-outline");Kt(Rn,{get class(){return e(Ue)},get icon(){return e(Ct)},width:18,height:18})}u(qr);var un=m(qr,2),zr=f(un),de=f(zr),ie=f(de),Qe=f(ie);lr(Qe);var x=m(Qe,2),At=f(x);{let Ue=w(()=>e(Jt)?"chevron-up":"chevron-down");Gt(At,{get name(){return e(Ue)},width:20,height:20,class:"block"})}u(x),u(ie);var Ve=m(ie,2);{var gt=Ue=>{var Ct=js(),Je=f(Ct);{var st=De=>{const Ae=w(()=>mn(e(z).result,e(ut).runConfig.repeats));var Be=pi(),mt=Le(Be),ot=f(mt);u(mt);var Er=m(mt,2);{var Jr=Zt=>{var _e=hn(),ht=f(_e);u(_e),H(()=>q(ht,`(${e(Ae).expectedSuccesses??""}/${e(Ae).expectedRuns??""}
|
|
28
28
|
expected)`)),g(Zt,_e)};j(Er,Zt=>{var _e;(_e=e(Ae))!=null&&_e.showExpected&&Zt(Jr)})}H(Zt=>{Oe(mt,1,Zt,"svelte-rdft55"),q(ot,`${e(z).result.successes??""}/${e(z).result.total_runs??""}`)},[()=>Ur(ln(e(z).result))]),g(De,Be)},at=De=>{var Ae=As();g(De,Ae)};j(Je,De=>{e(z).result?De(st):De(at,-1)})}u(Ct),g(Ue,Ct)};j(Ve,Ue=>{e(Jt)||Ue(gt)})}u(de);var Yt=m(de,2);{var $r=Ue=>{var Ct=hi(),Je=Le(Ct),st=f(Je);lr(st);var at=m(st,2);{var De=_e=>{var ht=gi(),se=f(ht);lr(se);var je=m(se,2);lr(je),u(ht),H(we=>{pn(se,we),pn(je,e(z).assertion_value)},[()=>Kn(e(z).assertion_type)]),g(_e,ht)};j(at,_e=>{e(z).evaluation_mode!=="json-deep-equal"&&_e(De)})}var Ae=m(at,2),Be=f(Ae);ct(Be,{variant:"secondary",size:"small",onclick:()=>Wt(`Test context — ${e(z).scenario||"Test"}`,an(e(z).context)),children:(_e,ht)=>{Ne();var se=We("View context");g(_e,se)},$$slots:{default:!0}});var mt=m(Be,2);ct(mt,{variant:"secondary",size:"small",onclick:()=>Wt(`Test mocks — ${e(z).scenario||"Test"}`,an(e(z).mocks)),children:(_e,ht)=>{Ne();var se=We("View mocks");g(_e,se)},$$slots:{default:!0}}),u(Ae);var ot=m(Ae,2);{let _e=w(()=>e(ir).highlight?[{startLine:e(ir).highlight.startLine,endLine:e(ir).highlight.endLine,className:e(z).evaluation_mode==="json-deep-equal"?"test-expected-json-output":"test-expected-output"}]:void 0);Is(ot,{get value(){return e(z).conversation_ui},get highlights(){return e(_e)},language:"markdown",height:220,readOnly:!0})}u(Je);var Er=m(Je,2),Jr=f(Er);{var Zt=_e=>{const ht=w(()=>mn(e(z).result,e(ut).runConfig.repeats));var se=mi(),je=Le(se),we=f(je),xt=f(we),it=f(xt);u(xt);var Ge=m(xt,2);{var ke=ge=>{var F=hn(),br=f(F);u(F),H(()=>q(br,`(${e(ht).expectedSuccesses??""}/${e(ht).expectedRuns??""}
|
|
29
29
|
expected)`)),g(ge,F)};j(Ge,ge=>{var F;(F=e(ht))!=null&&F.showExpected&&ge(ke)})}u(we),u(je);var jt=m(je,2);cr(jt,21,()=>e(z).result.runs,ge=>ge.index,(ge,F,br,dn)=>{var yr=Os(),Ht=f(yr),et=f(Ht,!0);u(Ht);var Pe=m(Ht,2),Vt=f(Pe),_r=f(Vt);{var Hr=J=>{Gt(J,{name:"checkmark",width:20,height:20,class:"shrink-0 self-end"})},Vr=J=>{Gt(J,{name:"close",width:18,height:18,class:"shrink-0 scale-110 self-start"})};j(_r,J=>{e(F).success?J(Hr):J(Vr,-1)})}var ee=m(_r,2),W=f(ee,!0);u(ee),u(Vt);var te=m(Vt,2);{let J=w(()=>e(z).scenario||"Test"),lt=w(()=>!e(F).text.trim()),er=w(()=>e(z).evaluation_mode!=="json-deep-equal"),bt=w(()=>!!o.getActivePromptEditId()),Ot=w(()=>e(F).success?void 0:()=>Qn(e(z),e(F).text||e(F).errors||"—"));Ls(te,{get scenario(){return e(J)},get runIndex(){return e(F).index},get links(){return e(F).links},get variants(){return e(z).result.runs},get region(){return e(l)},get actionsDisabled(){return e(ve)},get actionsInert(){return e(re)},get addTestDisabled(){return e(lt)},get showAnalyze(){return e(er)},get analyzeDisabled(){return e(dr)},get fixDisabled(){return e(bt)},onAddTest:()=>es(e(z),e(F).text,0),onAnalyze:()=>Nr(e(z).scenario||"Test",e(F).index,e(F).links.renderedPrompt),get onFix(){return e(Ot)}})}u(Pe),u(yr),H((J,lt)=>{Oe(Ht,1,`w-full whitespace-pre-wrap break-words rounded-lg px-3 py-2 text-rc-gray-100 ${e(z).evaluation_mode==="json-deep-equal"?"font-mono text-sm leading-6":""} ${e(F).success?"bg-rc-green-700 backdrop-blur-md":""}`,"svelte-rdft55"),Fn(Ht,e(F).success?"":"background-color: rgb(156 80 80)"),q(et,J),Oe(Pe,1,`flex w-full flex-col gap-x-4 whitespace-pre-wrap break-words ${e(F).success?"text-rc-green-200":"text-rc-red-800"}`,"svelte-rdft55"),q(W,lt)},[()=>as(e(F).text,e(F).errors,e(z).evaluation_mode==="json-deep-equal"),()=>e(F).success?"Pass":ts(e(F).evaluation)||(e(F).errors||"").split(/\r?\n/)[0]||"Fail"]),g(ge,yr)}),u(jt),H(ge=>{Oe(xt,1,ge,"svelte-rdft55"),q(it,`${e(z).result.successes??""}/${e(z).result.total_runs??""}`)},[()=>Ur(ln(e(z).result))]),g(_e,se)};j(Jr,_e=>{e(z).result&&_e(Zt)})}u(Er),H(()=>pn(st,e(z).author||"")),g(Ue,Ct)};j(Yt,Ue=>{e(Jt)&&Ue($r)})}u(zr),u(un),u(cn),u(Lr),H(()=>{Bt(Lr,"data-id",e(z).id),Oe(zr,1,`left-details-bg flex flex-col rounded border ${e(ir).valid?"border-rc-gray-700":"border-rc-red-600"}`,"svelte-rdft55"),Oe(de,1,`left-details-bg rounded-t px-2 pt-2 ${e(Jt)?"border-b border-rc-gray-700 pb-1":"pb-2"}`,"svelte-rdft55"),pn(Qe,e(z).scenario),Bt(x,"aria-label",e(Jt)?"Collapse test":"Expand test"),Bt(x,"title",e(Jt)?"Collapse":"Expand")}),Me("click",x,()=>la(e(z).id)),g(xr,Lr)}),u(It),g(Tt,It)};j(mr,Tt=>{e(Sr).length===0?Tt(hr):Tt(zt,-1)})}u(pe),H(Tt=>{q(U,Tt),q(Re,`${e(Tr).casesPassing??""}/${e(Tr).casesTotal??""}
|
|
30
30
|
cases passing`),q(qt,`${e(Tr).attemptsPassing??""}/${e(Tr).attemptsTotal??""}
|
|
31
|
-
attempts passing`)},[()=>Wn(e(ut).runScope)]),g(Z,pe)};j(Ft,Z=>{e(Zr)?Z(Pr):e(rr)&&!e(ut)?Z(kt,1):e(ut)&&Z(Xt,2)})}u(ne),u(p),g(d,p)},footer:d=>{ct(d,{variant:"outlined",size:"small",onclick:()=>i($e,!1),children:(p,h)=>{Ne();var _=We("Close");g(p,_)},$$slots:{default:!0}})},$$slots:{default:!0,footer:!0}});var ls=m(is,2);Qr(ls,{get title(){return e(E)},class:"!w-[80vw] !max-w-5xl",get open(){return e(fe)},set open(d){i(fe,d,!0)},children:d=>{var p=_i(),h=f(p,!0);u(p),H(()=>q(h,e(Q)||"—")),g(d,p)},footer:d=>{ct(d,{variant:"outlined",size:"small",onclick:()=>i(fe,!1),children:(p,h)=>{Ne();var _=We("Close");g(p,_)},$$slots:{default:!0}})},$$slots:{default:!0,footer:!0}});var ba=m(ls,2);{var ya=a=>{var c=Si(),d=f(c),p=f(d),h=f(p,!0);u(p);var _=m(p,2);{var y=M=>{var ce=wi(),ne=m(Le(ce),2);Bt(ne,"href",b),g(M,ce)},N=M=>{var ce=ki(),ne=Le(ce),Ft=f(ne,!0);u(ne);var Pr=m(ne,2);ct(Pr,{class:"mt-4",variant:"secondary",onclick:()=>void vt(),children:(kt,Xt)=>{Ne();var Z=We("Retry");g(kt,Z)},$$slots:{default:!0}}),H(()=>q(Ft,e(rt).message)),g(M,ce)};j(_,M=>{e(rt).kind==="legacy"?M(y):M(N,-1)})}u(d),u(c),H(()=>q(h,e(rt).kind==="legacy"?"This test suite requires migration":"Tests could not be loaded")),g(a,c)},_a=a=>{var c=Ki(),d=f(c);{var p=U=>{var ue=Ii(),Ce=m(f(ue),2);cr(Ce,21,()=>e(rn),us,(be,Re)=>{var Ze=Ti(),qt=f(Ze);u(Ze),H(()=>q(qt,`${e(Re).step??""} (${e(Re).count??""})`)),g(be,Ze)}),u(Ce),u(ue),g(U,ue)};j(d,U=>{e(rn).length>0&&U(p)})}var h=m(d,2),_=f(h),y=f(_),N=m(f(y),2);gn(N,{type:"number",min:"1",max:"500",class:"w-16",onchange:()=>{i(C,T(+e(C)||1,1,500),!0),K()},get value(){return e(C)},set value(U){i(C,U,!0)}}),u(y);var M=m(y,2),ce=m(f(M),2);gn(ce,{type:"number",min:"1",max:"75",class:"w-16",onchange:()=>{i($,T(+e($)||75,1,75),!0),K()},get value(){return e($)},set value(U){i($,U,!0)}}),u(M),u(_);var ne=m(_,2),Ft=f(ne);{var Pr=U=>{var ue=Ci(),Ce=f(ue),be=f(Ce);u(Ce);var Re=m(Ce,2);ct(Re,{variant:"secondary",onclick:ea,children:(Ze,qt)=>{Ne();var mr=We("Cancel");g(Ze,mr)},$$slots:{default:!0}}),u(ue),H(()=>q(be,`Running… ${e(Ir)??""}/${e(S)??""}`)),g(U,ue)};j(Ft,U=>{e(ve)&&U(Pr)})}var kt=m(Ft,2),Xt=f(kt);{let U=w(()=>e(ve)||!e(n));ct(Xt,{variant:"secondary",onclick:na,get inert(){return e(re)},get disabled(){return e(U)},class:"inline-flex items-center gap-1",children:(ue,Ce)=>{var be=Pi(),Re=Le(be);Kt(Re,{icon:"mdi:plus-thick",width:18,height:18}),Ne(),g(ue,be)},$$slots:{default:!0}})}var Z=m(Xt,2);{var pe=U=>{var ue=Li();g(U,ue)};j(Z,U=>{e(ft)&&e(qe).length===0&&U(pe)})}u(kt);var ye=m(kt,2);{let U=w(()=>e(ve)||e(qe).length===0||e(Dr)&&e(sn)===0);ct(ye,{class:"inline-flex min-w-32 items-center justify-center gap-1 disabled:cursor-not-allowed disabled:opacity-50",get inert(){return e(re)},get disabled(){return e(U)},onclick:()=>Ys(e(Dr)?"pinned":"all"),children:(ue,Ce)=>{Ne();var be=We();H(()=>q(be,`▶ ${e(Dr)?"Run pinned":"Run all"}`)),g(ue,be)},$$slots:{default:!0}})}u(ne),u(h);var Ye=m(h,2),Rt=f(Ye);{let U=w(()=>!e(n));ct(Rt,{variant:"secondary",class:"ml-11 inline-flex min-w-32 items-center justify-center gap-1",get disabled(){return e(U)},onclick:()=>void ua().catch(console.error),children:(ue,Ce)=>{var be=$i(),Re=Le(be);Kt(Re,{icon:"mdi:history",width:18,height:18}),Ne(),g(ue,be)},$$slots:{default:!0}})}var St=m(Rt,2);{var Ie=U=>{{let ue=w(()=>!e(n));ct(U,{variant:"secondary",class:"inline-flex min-w-32 items-center justify-center gap-1",get inert(){return e(re)},get disabled(){return e(ue)},onclick:()=>void ma().catch(console.error),children:(Ce,be)=>{var Re=Ei(),Ze=Le(Re);Gt(Ze,{name:"chevron-up",width:16,height:16,class:"block"}),Ne(),g(Ce,Re)},$$slots:{default:!0}})}};j(St,U=>{e(_t)&&U(Ie)})}u(Ye);var gr=m(Ye,2),Fr=f(gr);
|
|
31
|
+
attempts passing`)},[()=>Wn(e(ut).runScope)]),g(Z,pe)};j(Ft,Z=>{e(Zr)?Z(Pr):e(rr)&&!e(ut)?Z(kt,1):e(ut)&&Z(Xt,2)})}u(ne),u(p),g(d,p)},footer:d=>{ct(d,{variant:"outlined",size:"small",onclick:()=>i($e,!1),children:(p,h)=>{Ne();var _=We("Close");g(p,_)},$$slots:{default:!0}})},$$slots:{default:!0,footer:!0}});var ls=m(is,2);Qr(ls,{get title(){return e(E)},class:"!w-[80vw] !max-w-5xl",get open(){return e(fe)},set open(d){i(fe,d,!0)},children:d=>{var p=_i(),h=f(p,!0);u(p),H(()=>q(h,e(Q)||"—")),g(d,p)},footer:d=>{ct(d,{variant:"outlined",size:"small",onclick:()=>i(fe,!1),children:(p,h)=>{Ne();var _=We("Close");g(p,_)},$$slots:{default:!0}})},$$slots:{default:!0,footer:!0}});var ba=m(ls,2);{var ya=a=>{var c=Si(),d=f(c),p=f(d),h=f(p,!0);u(p);var _=m(p,2);{var y=M=>{var ce=wi(),ne=m(Le(ce),2);Bt(ne,"href",b),g(M,ce)},N=M=>{var ce=ki(),ne=Le(ce),Ft=f(ne,!0);u(ne);var Pr=m(ne,2);ct(Pr,{class:"mt-4",variant:"secondary",onclick:()=>void vt(),children:(kt,Xt)=>{Ne();var Z=We("Retry");g(kt,Z)},$$slots:{default:!0}}),H(()=>q(Ft,e(rt).message)),g(M,ce)};j(_,M=>{e(rt).kind==="legacy"?M(y):M(N,-1)})}u(d),u(c),H(()=>q(h,e(rt).kind==="legacy"?"This test suite requires migration":"Tests could not be loaded")),g(a,c)},_a=a=>{var c=Ki(),d=f(c);{var p=U=>{var ue=Ii(),Ce=m(f(ue),2);cr(Ce,21,()=>e(rn),us,(be,Re)=>{var Ze=Ti(),qt=f(Ze);u(Ze),H(()=>q(qt,`${e(Re).step??""} (${e(Re).count??""})`)),g(be,Ze)}),u(Ce),u(ue),g(U,ue)};j(d,U=>{e(rn).length>0&&U(p)})}var h=m(d,2),_=f(h),y=f(_),N=m(f(y),2);gn(N,{type:"number",min:"1",max:"500",class:"w-16",onchange:()=>{i(C,T(+e(C)||1,1,500),!0),K()},get value(){return e(C)},set value(U){i(C,U,!0)}}),u(y);var M=m(y,2),ce=m(f(M),2);gn(ce,{type:"number",min:"1",max:"75",class:"w-16",onchange:()=>{i($,T(+e($)||75,1,75),!0),K()},get value(){return e($)},set value(U){i($,U,!0)}}),u(M),u(_);var ne=m(_,2),Ft=f(ne);{var Pr=U=>{var ue=Ci(),Ce=f(ue),be=f(Ce);u(Ce);var Re=m(Ce,2);ct(Re,{variant:"secondary",onclick:ea,children:(Ze,qt)=>{Ne();var mr=We("Cancel");g(Ze,mr)},$$slots:{default:!0}}),u(ue),H(()=>q(be,`Running… ${e(Ir)??""}/${e(S)??""}`)),g(U,ue)};j(Ft,U=>{e(ve)&&U(Pr)})}var kt=m(Ft,2),Xt=f(kt);{let U=w(()=>e(ve)||!e(n));ct(Xt,{variant:"secondary",onclick:na,get inert(){return e(re)},get disabled(){return e(U)},class:"inline-flex items-center gap-1",children:(ue,Ce)=>{var be=Pi(),Re=Le(be);Kt(Re,{icon:"mdi:plus-thick",width:18,height:18}),Ne(),g(ue,be)},$$slots:{default:!0}})}var Z=m(Xt,2);{var pe=U=>{var ue=Li();g(U,ue)};j(Z,U=>{e(ft)&&e(qe).length===0&&U(pe)})}u(kt);var ye=m(kt,2);{let U=w(()=>e(ve)||e(qe).length===0||e(Dr)&&e(sn)===0);ct(ye,{class:"inline-flex min-w-32 items-center justify-center gap-1 disabled:cursor-not-allowed disabled:opacity-50",get inert(){return e(re)},get disabled(){return e(U)},onclick:()=>Ys(e(Dr)?"pinned":"all"),children:(ue,Ce)=>{Ne();var be=We();H(()=>q(be,`▶ ${e(Dr)?"Run pinned":"Run all"}`)),g(ue,be)},$$slots:{default:!0}})}u(ne),u(h);var Ye=m(h,2),Rt=f(Ye);{let U=w(()=>!e(n));ct(Rt,{variant:"secondary",class:"ml-11 inline-flex min-w-32 items-center justify-center gap-1",get disabled(){return e(U)},onclick:()=>void ua().catch(console.error),children:(ue,Ce)=>{var be=$i(),Re=Le(be);Kt(Re,{icon:"mdi:history",width:18,height:18}),Ne(),g(ue,be)},$$slots:{default:!0}})}var St=m(Rt,2);{var Ie=U=>{{let ue=w(()=>!e(n));ct(U,{variant:"secondary",class:"inline-flex min-w-32 items-center justify-center gap-1",get inert(){return e(re)},get disabled(){return e(ue)},onclick:()=>void ma().catch(console.error),children:(Ce,be)=>{var Re=Ei(),Ze=Le(Re);Gt(Ze,{name:"chevron-up",width:16,height:16,class:"block"}),Ne(),g(Ce,Re)},$$slots:{default:!0}})}};j(St,U=>{e(_t)&&U(Ie)})}u(Ye);var gr=m(Ye,2),Fr=f(gr);Oa(Fr,{class:"relative flex h-full min-w-0 flex-col overflow-hidden !rounded-none p-0",children:(U,ue)=>{var Ce=Gi(),be=Le(Ce),Re=f(be),Ze=f(Re);{var qt=de=>{var ie=Ri();g(de,ie)},mr=de=>{var ie=Ai(),Qe=f(ie);{let x=w(()=>e(Dr)?"mdi:pin":"mdi:pin-outline");Kt(Qe,{class:"block",get icon(){return e(x)},width:18,height:18})}u(ie),H(()=>{Oe(ie,1,`icon-btn justify-self-center ${e(Dr)?"text-rc-green-200":"text-gray-300 hover:text-gray-100"}`,"svelte-rdft55"),ie.inert=e(re),ie.disabled=e(ve)||e(qe).length===0}),Me("click",ie,async()=>{await ta(!e(ra))}),g(de,ie)};j(Ze,de=>{e(ve)?de(qt):de(mr,-1)})}var hr=m(Ze,2),zt=f(hr),Tt=f(zt);u(zt);var It=m(zt,2),xr=f(It);u(It);var z=m(It,2),ir=f(z);u(z);var Jt=m(z,2);{var Lr=de=>{var ie=Dn(),Qe=f(ie);{let Ve=w(()=>e(pt).trend.direction==="higher"?"chevron-up":"chevron-down");Gt(Qe,{get name(){return e(Ve)},width:16,height:16,class:"inline-block align-text-bottom"})}var x=m(Qe),At=f(x,!0);u(x),u(ie),H((Ve,gt)=>{Oe(ie,1,`whitespace-nowrap font-semibold ${e(pt).trend.direction==="higher"?"text-rc-green-200":"text-rc-red-600"}`,"svelte-rdft55"),Bt(ie,"title",Ve),q(At,gt)},[()=>`Previous ${e(pt).trend.previousAttemptsPassing}/${e(pt).trend.previousAttemptsTotal}, current ${e(pt).trend.currentAttemptsPassing}/${e(pt).trend.currentAttemptsTotal}, p=${e(pt).trend.pValue.toPrecision(2)}`,()=>Xs(e(pt).trend.direction)]),g(de,ie)};j(Jt,de=>{e(pt).trend&&de(Lr)})}u(hr),u(Re);var cn=m(Re,2);{var qr=de=>{var ie=Rs();g(de,ie)},Rn=de=>{var ie=Ns();cr(ie,23,()=>e(qe),Qe=>Qe.id,(Qe,x,At)=>{const Ve=w(()=>En(e(x).conversation_ui,e(x))),gt=w(()=>e(ar).has(e(x).id));var Yt=Vi(),$r=f(Yt),Ue=f($r),Ct=f(Ue);{var Je=se=>{var je=ji(),we=f(je);{var xt=F=>{Kt(F,{icon:"mdi:check",width:20,height:20,class:"text-rc-green-200"})},it=w(()=>e(Mt).has(e(x).id)),Ge=F=>{Kt(F,{icon:"mdi:play",width:20,height:20,class:"text-rc-green-200"})},ke=w(()=>e(dt).has(e(x).id)),jt=F=>{Kt(F,{icon:"mdi:play-outline",width:20,height:20,class:"text-rc-green-200"})},ge=w(()=>e($t).has(e(x).id));j(we,F=>{e(it)?F(xt):e(ke)?F(Ge,1):e(ge)&&F(jt,2)})}u(je),g(se,je)},st=se=>{var je=Oi(),we=Le(je),xt=f(we);{let ge=w(()=>e(x).pinned?"mdi:pin":"mdi:pin-outline");Kt(xt,{class:"block",get icon(){return e(ge)},width:18,height:18})}u(we);var it=m(we,2),Ge=f(it);Kt(Ge,{icon:"mdi:content-copy",width:18,height:18}),u(it);var ke=m(it,2),jt=f(ke);Kt(jt,{icon:"mdi:trash-can-outline",width:18,height:18}),u(ke),H(()=>{Oe(we,1,`icon-btn ${e(x).pinned?"text-rc-green-200":"text-gray-300 hover:text-gray-100"}`,"svelte-rdft55"),Bt(we,"aria-label",e(x).pinned?"Unpin":"Pin"),Bt(we,"title",e(x).pinned?"Unpin":"Pin"),we.inert=e(re),we.disabled=e(ve),it.inert=e(re),it.disabled=e(ve),ke.inert=e(re),ke.disabled=e(ve)}),Me("click",we,async()=>{const ge=!e(x).pinned;i(oe,e(oe).map(F=>F.id===e(x).id?{...F,pinned:ge}:F),!0),await wt(or(e(x).id,{pinned:ge?"TRUE":"FALSE"}))}),Me("click",it,()=>fa(e(x),e(At))),Me("click",ke,()=>pa(e(x).id)),g(se,je)};j(Ct,se=>{e(ve)?se(Je):se(st,-1)})}u(Ue);var at=m(Ue,2),De=f(at),Ae=f(De),Be=f(Ae),mt=f(Be);lr(mt);var ot=m(mt,2),Er=f(ot);{let se=w(()=>e(gt)?"chevron-up":"chevron-down");Gt(Er,{get name(){return e(se)},width:20,height:20,class:"block"})}u(ot),u(Be);var Jr=m(Be,2);{var Zt=se=>{var je=js(),we=f(je);{var xt=Ge=>{const ke=w(()=>mn(e(x).result,e(X)));var jt=Ni(),ge=Le(jt),F=f(ge);u(ge);var br=m(ge,2);{var dn=et=>{var Pe=hn(),Vt=f(Pe);u(Pe),H(()=>q(Vt,`(${e(ke).expectedSuccesses??""}/${e(ke).expectedRuns??""}
|
|
32
32
|
expected)`)),g(et,Pe)};j(br,et=>{var Pe;(Pe=e(ke))!=null&&Pe.showExpected&&et(dn)})}var yr=m(br,2);{var Ht=et=>{var Pe=Dn(),Vt=f(Pe);{let Vr=w(()=>e(ke).direction==="higher"?"chevron-up":"chevron-down");Gt(Vt,{get name(){return e(Vr)},width:16,height:16,class:"inline-block align-text-bottom"})}var _r=m(Vt),Hr=f(_r,!0);u(_r),u(Pe),H(()=>{Oe(Pe,1,`ml-2 whitespace-nowrap font-semibold ${e(ke).direction==="higher"?"text-rc-green-200":"text-rc-red-600"}`,"svelte-rdft55"),q(Hr,e(ke).comparisonLabel)}),g(et,Pe)};j(yr,et=>{var Pe;(Pe=e(ke))!=null&&Pe.comparisonLabel&&et(Ht)})}H(et=>{Oe(ge,1,et,"svelte-rdft55"),q(F,`${e(x).result.successes??""}/${e(x).result.total_runs??""}`)},[()=>Ur(ln(e(x).result))]),g(Ge,jt)},it=Ge=>{var ke=As();g(Ge,ke)};j(we,Ge=>{e(x).result?Ge(xt):Ge(it,-1)})}u(je),g(se,je)};j(Jr,se=>{e(gt)||se(Zt)})}u(Ae);var _e=m(Ae,2);{var ht=se=>{var je=Hi(),we=Le(je),xt=f(we);{var it=ee=>{var W=Mi(),te=f(W);u(W),H(J=>q(te,`Invalid test: expected must be the
|
|
33
|
-
last ${J??""}`),[()=>kr(e(x).step)?"“Agent: …” block":e(x).evaluation_mode==="json-deep-equal"?"“Step: …” block with valid JSON":"“Step: …” block"]),g(ee,W)};j(xt,ee=>{e(Ve).valid||ee(it)})}var Ge=m(xt,2);lr(Ge);var ke=m(Ge,2);{var jt=ee=>{var W=Fi(),te=f(W);cr(te,21,()=>Mr,us,(lt,er)=>{var bt=Di(),Ot=f(bt,!0);u(bt);var Rr={};H(()=>{q(Ot,e(er).label),Rr!==(Rr=e(er).value)&&(bt.value=(bt.__value=e(er).value)??"")}),g(lt,bt)}),u(te);var J=m(te,2);lr(J),u(W),Me("change",te,()=>or(e(x).id,{assertion_type:e(x).assertion_type})),
|
|
34
|
-
expected)`)),g(yt,He)};j(er,yt=>{var He;(He=e(W))!=null&&He.showExpected&&yt(bt)})}var Ot=m(er,2);{var Rr=yt=>{var He=Dn(),wr=f(He);{let vn=w(()=>e(W).direction==="higher"?"chevron-up":"chevron-down");Gt(wr,{get name(){return e(vn)},width:18,height:18,class:"inline-block align-text-bottom"})}var fn=m(wr),An=f(fn,!0);u(fn),u(He),H(()=>{Oe(He,1,`ml-2 whitespace-nowrap font-semibold ${e(W).direction==="higher"?"text-rc-green-200":"text-rc-red-600"}`,"svelte-rdft55"),q(An,e(W).comparisonLabel)}),g(yt,He)};j(Ot,yt=>{var He;(He=e(W))!=null&&He.comparisonLabel&&yt(Rr)})}u(te),H(yt=>{Oe(J,1,yt,"svelte-rdft55"),q(lt,`${e(x).result.successes??""}/${e(x).result.total_runs??""}`)},[()=>Ur(ln(e(x).result))]),g(ee,te)};j(Vt,ee=>{e(x).result&&ee(_r)})}u(et);var Hr=m(et,2);{var Vr=ee=>{var W=Ji();cr(W,21,()=>e(x).result.runs,te=>te.index,(te,J,lt,er)=>{var bt=Os(),Ot=f(bt),Rr=f(Ot,!0);u(Ot);var yt=m(Ot,2),He=f(yt),wr=f(He);{var fn=Ut=>{Gt(Ut,{name:"checkmark",width:20,height:20,class:"shrink-0 self-end"})},An=Ut=>{Gt(Ut,{name:"close",width:18,height:18,class:"shrink-0 scale-110 self-start"})};j(wr,Ut=>{e(J).success?Ut(fn):Ut(An,-1)})}var vn=m(wr,2),wa=f(vn,!0);u(vn),u(He);var ka=m(He,2);{let Ut=w(()=>e(x).scenario||"Test"),jn=w(()=>!e(J).text.trim()),Sa=w(()=>e(x).evaluation_mode!=="json-deep-equal"),Ta=w(()=>!!o.getActivePromptEditId()),Ia=w(()=>e(J).success?void 0:()=>Qn(e(x),e(J).text||e(J).errors||"—"));Ls(ka,{get scenario(){return e(Ut)},get runIndex(){return e(J).index},get links(){return e(J).links},get variants(){return e(x).result.runs},get region(){return e(l)},get actionsDisabled(){return e(ve)},get actionsInert(){return e(re)},get addTestDisabled(){return e(jn)},get showAnalyze(){return e(Sa)},get analyzeDisabled(){return e(dr)},get fixDisabled(){return e(Ta)},onAddTest:()=>es(e(x),e(J).text,e(At)),onAnalyze:()=>Nr(e(x).scenario||"Test",e(J).index,e(J).links.renderedPrompt),get onFix(){return e(Ia)}})}u(yt),u(bt),H((Ut,jn)=>{Oe(Ot,1,`w-full whitespace-pre-wrap break-words rounded-lg px-3 py-2 text-rc-gray-100 ${e(x).evaluation_mode==="json-deep-equal"?"font-mono text-sm leading-6":""} ${e(J).success?"bg-rc-green-700 backdrop-blur-md":""}`,"svelte-rdft55"),Fn(Ot,e(J).success?"":"background-color: rgb(156 80 80)"),q(Rr,Ut),Oe(yt,1,`flex w-full flex-col gap-x-4 whitespace-pre-wrap break-words ${e(J).success?"text-rc-green-200":"text-rc-red-800"}`,"svelte-rdft55"),q(wa,jn)},[()=>as(e(J).text,e(J).errors,e(x).evaluation_mode==="json-deep-equal"),()=>e(J).success?"Pass":ts(e(J).evaluation)||(e(J).errors||"").split(/\r?\n/)[0]||"Fail"]),g(te,bt)}),u(W),g(ee,W)};j(Hr,ee=>{e(x).result&&ee(Vr)})}u(Ht),Me("change",Ge,()=>or(e(x).id,{author:e(x).author||""})),On(Ge,()=>e(x).author,ee=>e(x).author=ee),g(se,je)};j(_e,se=>{e(gt)&&se(ht)})}u(De),u(at),u($r),u(Yt),H(()=>{Bt(Yt,"data-id",e(x).id),Oe(De,1,`left-details-bg flex flex-col rounded border ${e(Ve).valid?"border-rc-gray-700":"border-rc-red-600"}`,"svelte-rdft55"),Oe(Ae,1,`left-details-bg sticky top-0 z-10 rounded-t px-2 pt-2 ${e(gt)?"border-b border-rc-gray-700 pb-1":"pb-2"}`,"svelte-rdft55"),Bt(ot,"aria-label",e(gt)?"Collapse test":"Expand test"),Bt(ot,"title",e(gt)?"Collapse":"Expand"),ot.inert=e(re)}),Me("change",mt,()=>or(e(x).id,{scenario:e(x).scenario})),On(mt,()=>e(x).scenario,se=>e(x).scenario=se),Me("click",ot,()=>ga(e(x).id)),g(Qe,Yt)}),u(ie),g(de,ie)};j(cn,de=>{e(qe).length===0?de(qr):de(Rn,-1)})}u(be);var un=m(be,2);{var zr=de=>{const ie=w(()=>e(oe).find(Qe=>Qe.id===e(R)));{const Qe=At=>{var Ve=Bi(),gt=f(Ve);Ds(gt,{get value(){return e(A)},ariaLabel:"Test context tabs",onChange:({value:Je})=>i(A,Je,!0),children:(Je,st)=>{var at=Ui(),De=Le(at);Wr(De,{value:"context",class:"px-3",children:(Be,mt)=>{Ne();var ot=We("Context");g(Be,ot)},$$slots:{default:!0}});var Ae=m(De,2);Wr(Ae,{value:"mocks",class:"px-3",children:(Be,mt)=>{Ne();var ot=We("Mocks");g(Be,ot)},$$slots:{default:!0}}),g(Je,at)},$$slots:{default:!0}});var Yt=m(gt,2),$r=f(Yt);{var Ue=Je=>{var st=yn(),at=Le(st);cs(at,()=>`${e(R)}:context`,De=>{{let Ae=w(()=>`editorState/context/${e(n)}/tests/${e(R)}`);fs(De,{class:"h-full min-h-0 border-thin border-rc-gray-650 shadow-inner-white-soft backdrop-blur-3xl",get context(){return e(P)},suppressErrors:!0,defaultFormat:"yaml",hideHeader:!0,get editorStateKey(){return e(Ae)},onContextChanged:Be=>i(P,Be,!0)})}}),g(Je,st)},Ct=Je=>{var st=yn(),at=Le(st);cs(at,()=>`${e(R)}:mocks`,De=>{{let Ae=w(()=>`editorState/mocks/${e(n)}/tests/${e(R)}`);fs(De,{class:"h-full min-h-0 border-thin border-rc-gray-650 shadow-inner-white-soft backdrop-blur-3xl",get context(){return e(D)},suppressErrors:!0,defaultFormat:"yaml",hideHeader:!0,get editorStateKey(){return e(Ae)},onContextChanged:Be=>{i(D,Be,!0),i(V,!0)}})}}),g(Je,st)};j($r,Je=>{e(A)==="context"?Je(Ue):Je(Ct,-1)})}u(Yt),u(Ve),g(At,Ve)};let x=w(()=>{var At;return`Test context — ${((At=e(ie))==null?void 0:At.scenario)||"Test"}`});
|
|
35
|
-
passing`)}),g(U,Ce)}}),u(gr),u(c),g(a,c)};j(ba,a=>{e(ft)&&e(rt)?a(ya):e(ft)&&a(_a,1)})}g(t,os),Sn()}Ms(["click","change"]);export{
|
|
33
|
+
last ${J??""}`),[()=>kr(e(x).step)?"“Agent: …” block":e(x).evaluation_mode==="json-deep-equal"?"“Step: …” block with valid JSON":"“Step: …” block"]),g(ee,W)};j(xt,ee=>{e(Ve).valid||ee(it)})}var Ge=m(xt,2);lr(Ge);var ke=m(Ge,2);{var jt=ee=>{var W=Fi(),te=f(W);cr(te,21,()=>Mr,us,(lt,er)=>{var bt=Di(),Ot=f(bt,!0);u(bt);var Rr={};H(()=>{q(Ot,e(er).label),Rr!==(Rr=e(er).value)&&(bt.value=(bt.__value=e(er).value)??"")}),g(lt,bt)}),u(te);var J=m(te,2);lr(J),u(W),Me("change",te,()=>or(e(x).id,{assertion_type:e(x).assertion_type})),Ra(te,()=>e(x).assertion_type,lt=>e(x).assertion_type=lt),Me("change",J,()=>or(e(x).id,{assertion_value:e(x).assertion_value})),On(J,()=>e(x).assertion_value,lt=>e(x).assertion_value=lt),g(ee,W)};j(ke,ee=>{e(x).evaluation_mode!=="json-deep-equal"&&ee(jt)})}var ge=m(ke,2),F=f(ge);ct(F,{variant:"secondary",size:"small",get inert(){return e(re)},get disabled(){return e(ve)},onclick:()=>ha(e(x)),children:(ee,W)=>{Ne();var te=We("Edit context");g(ee,te)},$$slots:{default:!0}});var br=m(F,2);{var dn=ee=>{var W=qi(),te=f(W);lr(te),Ne(2),u(W),H(()=>te.disabled=e(ve)),Me("change",te,()=>wt(or(e(x).id,{case_sensitive:e(x).case_sensitive}))),Aa(te,()=>e(x).case_sensitive,J=>e(x).case_sensitive=J),g(ee,W)};j(br,ee=>{e(x).evaluation_mode==="json-deep-equal"&&ee(dn)})}u(ge);var yr=m(ge,2);{let ee=w(()=>e(Ve).highlight?[{startLine:e(Ve).highlight.startLine,endLine:e(Ve).highlight.endLine,className:e(x).evaluation_mode==="json-deep-equal"?"test-expected-json-output":"test-expected-output"}]:void 0);Is(yr,{get value(){return e(x).conversation_ui},onChange:W=>e(x).conversation_ui=W,onBlur:async W=>{if(!e(n))return;const te=En(W,e(x));e(x).conversation=te.conversation,e(x).expected_output=te.expected,te.valid&&e(x).evaluation_mode==="json-deep-equal"&&(e(x).conversation_ui=on(e(x).conversation,e(x).expected_output,e(x).step,!0)),await wt(or(e(x).id,{conversation:e(x).conversation,expected_output:e(x).expected_output}))},get highlights(){return e(ee)},language:"markdown",height:220})}u(we);var Ht=m(we,2),et=f(Ht),Pe=f(et);{let ee=w(()=>e(ve)||!e(Ve).valid),W=w(()=>e(Ve).valid?"Run":`Expected must be the last ${kr(e(x).step)?"Agent":"Step"} block${e(x).evaluation_mode==="json-deep-equal"?" with valid JSON":""}`);ct(Pe,{size:"small",get inert(){return e(re)},get disabled(){return e(ee)},get title(){return e(W)},onclick:()=>Zs(e(x).id),children:(te,J)=>{Ne();var lt=We("▶ Run");g(te,lt)},$$slots:{default:!0}})}var Vt=m(Pe,2);{var _r=ee=>{const W=w(()=>mn(e(x).result,e(X)));var te=zi(),J=f(te),lt=f(J);u(J);var er=m(J,2);{var bt=yt=>{var He=hn(),wr=f(He);u(He),H(()=>q(wr,`(${e(W).expectedSuccesses??""}/${e(W).expectedRuns??""}
|
|
34
|
+
expected)`)),g(yt,He)};j(er,yt=>{var He;(He=e(W))!=null&&He.showExpected&&yt(bt)})}var Ot=m(er,2);{var Rr=yt=>{var He=Dn(),wr=f(He);{let vn=w(()=>e(W).direction==="higher"?"chevron-up":"chevron-down");Gt(wr,{get name(){return e(vn)},width:18,height:18,class:"inline-block align-text-bottom"})}var fn=m(wr),An=f(fn,!0);u(fn),u(He),H(()=>{Oe(He,1,`ml-2 whitespace-nowrap font-semibold ${e(W).direction==="higher"?"text-rc-green-200":"text-rc-red-600"}`,"svelte-rdft55"),q(An,e(W).comparisonLabel)}),g(yt,He)};j(Ot,yt=>{var He;(He=e(W))!=null&&He.comparisonLabel&&yt(Rr)})}u(te),H(yt=>{Oe(J,1,yt,"svelte-rdft55"),q(lt,`${e(x).result.successes??""}/${e(x).result.total_runs??""}`)},[()=>Ur(ln(e(x).result))]),g(ee,te)};j(Vt,ee=>{e(x).result&&ee(_r)})}u(et);var Hr=m(et,2);{var Vr=ee=>{var W=Ji();cr(W,21,()=>e(x).result.runs,te=>te.index,(te,J,lt,er)=>{var bt=Os(),Ot=f(bt),Rr=f(Ot,!0);u(Ot);var yt=m(Ot,2),He=f(yt),wr=f(He);{var fn=Ut=>{Gt(Ut,{name:"checkmark",width:20,height:20,class:"shrink-0 self-end"})},An=Ut=>{Gt(Ut,{name:"close",width:18,height:18,class:"shrink-0 scale-110 self-start"})};j(wr,Ut=>{e(J).success?Ut(fn):Ut(An,-1)})}var vn=m(wr,2),wa=f(vn,!0);u(vn),u(He);var ka=m(He,2);{let Ut=w(()=>e(x).scenario||"Test"),jn=w(()=>!e(J).text.trim()),Sa=w(()=>e(x).evaluation_mode!=="json-deep-equal"),Ta=w(()=>!!o.getActivePromptEditId()),Ia=w(()=>e(J).success?void 0:()=>Qn(e(x),e(J).text||e(J).errors||"—"));Ls(ka,{get scenario(){return e(Ut)},get runIndex(){return e(J).index},get links(){return e(J).links},get variants(){return e(x).result.runs},get region(){return e(l)},get actionsDisabled(){return e(ve)},get actionsInert(){return e(re)},get addTestDisabled(){return e(jn)},get showAnalyze(){return e(Sa)},get analyzeDisabled(){return e(dr)},get fixDisabled(){return e(Ta)},onAddTest:()=>es(e(x),e(J).text,e(At)),onAnalyze:()=>Nr(e(x).scenario||"Test",e(J).index,e(J).links.renderedPrompt),get onFix(){return e(Ia)}})}u(yt),u(bt),H((Ut,jn)=>{Oe(Ot,1,`w-full whitespace-pre-wrap break-words rounded-lg px-3 py-2 text-rc-gray-100 ${e(x).evaluation_mode==="json-deep-equal"?"font-mono text-sm leading-6":""} ${e(J).success?"bg-rc-green-700 backdrop-blur-md":""}`,"svelte-rdft55"),Fn(Ot,e(J).success?"":"background-color: rgb(156 80 80)"),q(Rr,Ut),Oe(yt,1,`flex w-full flex-col gap-x-4 whitespace-pre-wrap break-words ${e(J).success?"text-rc-green-200":"text-rc-red-800"}`,"svelte-rdft55"),q(wa,jn)},[()=>as(e(J).text,e(J).errors,e(x).evaluation_mode==="json-deep-equal"),()=>e(J).success?"Pass":ts(e(J).evaluation)||(e(J).errors||"").split(/\r?\n/)[0]||"Fail"]),g(te,bt)}),u(W),g(ee,W)};j(Hr,ee=>{e(x).result&&ee(Vr)})}u(Ht),Me("change",Ge,()=>or(e(x).id,{author:e(x).author||""})),On(Ge,()=>e(x).author,ee=>e(x).author=ee),g(se,je)};j(_e,se=>{e(gt)&&se(ht)})}u(De),u(at),u($r),u(Yt),H(()=>{Bt(Yt,"data-id",e(x).id),Oe(De,1,`left-details-bg flex flex-col rounded border ${e(Ve).valid?"border-rc-gray-700":"border-rc-red-600"}`,"svelte-rdft55"),Oe(Ae,1,`left-details-bg sticky top-0 z-10 rounded-t px-2 pt-2 ${e(gt)?"border-b border-rc-gray-700 pb-1":"pb-2"}`,"svelte-rdft55"),Bt(ot,"aria-label",e(gt)?"Collapse test":"Expand test"),Bt(ot,"title",e(gt)?"Collapse":"Expand"),ot.inert=e(re)}),Me("change",mt,()=>or(e(x).id,{scenario:e(x).scenario})),On(mt,()=>e(x).scenario,se=>e(x).scenario=se),Me("click",ot,()=>ga(e(x).id)),g(Qe,Yt)}),u(ie),g(de,ie)};j(cn,de=>{e(qe).length===0?de(qr):de(Rn,-1)})}u(be);var un=m(be,2);{var zr=de=>{const ie=w(()=>e(oe).find(Qe=>Qe.id===e(R)));{const Qe=At=>{var Ve=Bi(),gt=f(Ve);Ds(gt,{get value(){return e(A)},ariaLabel:"Test context tabs",onChange:({value:Je})=>i(A,Je,!0),children:(Je,st)=>{var at=Ui(),De=Le(at);Wr(De,{value:"context",class:"px-3",children:(Be,mt)=>{Ne();var ot=We("Context");g(Be,ot)},$$slots:{default:!0}});var Ae=m(De,2);Wr(Ae,{value:"mocks",class:"px-3",children:(Be,mt)=>{Ne();var ot=We("Mocks");g(Be,ot)},$$slots:{default:!0}}),g(Je,at)},$$slots:{default:!0}});var Yt=m(gt,2),$r=f(Yt);{var Ue=Je=>{var st=yn(),at=Le(st);cs(at,()=>`${e(R)}:context`,De=>{{let Ae=w(()=>`editorState/context/${e(n)}/tests/${e(R)}`);fs(De,{class:"h-full min-h-0 border-thin border-rc-gray-650 shadow-inner-white-soft backdrop-blur-3xl",get context(){return e(P)},suppressErrors:!0,defaultFormat:"yaml",hideHeader:!0,get editorStateKey(){return e(Ae)},onContextChanged:Be=>i(P,Be,!0)})}}),g(Je,st)},Ct=Je=>{var st=yn(),at=Le(st);cs(at,()=>`${e(R)}:mocks`,De=>{{let Ae=w(()=>`editorState/mocks/${e(n)}/tests/${e(R)}`);fs(De,{class:"h-full min-h-0 border-thin border-rc-gray-650 shadow-inner-white-soft backdrop-blur-3xl",get context(){return e(D)},suppressErrors:!0,defaultFormat:"yaml",hideHeader:!0,get editorStateKey(){return e(Ae)},onContextChanged:Be=>{i(D,Be,!0),i(V,!0)}})}}),g(Je,st)};j($r,Je=>{e(A)==="context"?Je(Ue):Je(Ct,-1)})}u(Yt),u(Ve),g(At,Ve)};let x=w(()=>{var At;return`Test context — ${((At=e(ie))==null?void 0:At.scenario)||"Test"}`});Na(de,{get title(){return e(x)},onClose:()=>void xa(),children:Qe})}};j(un,de=>{e(R)&&de(zr)})}H(()=>{q(Tt,`Pinned: ${e(sn)??""}/${e(qe).length??""}`),q(xr,`${e(pt).casesPassing??""}/${e(pt).casesTotal??""} cases passing`),q(ir,`${e(pt).attemptsPassing??""}/${e(pt).attemptsTotal??""} attempts
|
|
35
|
+
passing`)}),g(U,Ce)}}),u(gr),u(c),g(a,c)};j(ba,a=>{e(ft)&&e(rt)?a(ya):e(ft)&&a(_a,1)})}g(t,os),Sn()}Ms(["click","change"]);export{wl as component};
|
package/build/bosun-app/frontend/client/_app/immutable/nodes/{15.drIyAxl2.js → 15.D4h0JT65.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as t,b as r,a as s,f as c}from"../chunks/
|
|
1
|
+
import{d as t,b as r,a as s,f as c}from"../chunks/D24F_tet.js";import"../chunks/DbY589nb.js";import{e as l,$ as i}from"../chunks/0Q6TVg1G.js";import{h as d}from"../chunks/FLx39vZ1.js";var f=c('<div class="flex h-full w-full flex-col bg-rc-gray-980"><div class="flex-none border-b border-rc-gray-300/40 p-4"><h2 class="text-lg font-semibold text-rc-gray-100">Traces</h2></div> <div class="min-h-0 flex-1 overflow-auto p-4"><div class="py-8 text-center text-rc-gray-300">Select a conversation to view traces</div></div></div>');function g(o){var e=f();d("1yb39s2",a=>{l(()=>{i.title="Bosun: Telescope"})}),r("click",e,a=>a.stopPropagation()),s(o,e)}t(["click"]);export{g as component};
|