@runeya/apps-cli 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/index.js +5303 -0
- package/dist/agent/index.js.map +1 -0
- package/dist/agent-manager-3S4FUNJS-MYT5X6XQ.js +8 -0
- package/dist/agent-manager-3S4FUNJS-MYT5X6XQ.js.map +1 -0
- package/dist/chunk-32HTB3XS.js +350 -0
- package/dist/chunk-32HTB3XS.js.map +1 -0
- package/dist/chunk-ERJIU7R4.js +195 -0
- package/dist/chunk-ERJIU7R4.js.map +1 -0
- package/dist/chunk-XZPCEGWS.js +2452 -0
- package/dist/chunk-XZPCEGWS.js.map +1 -0
- package/dist/dist-MFM5N25P.js +10985 -0
- package/dist/dist-MFM5N25P.js.map +1 -0
- package/dist/index.js.map +1 -0
- package/dist/kanban-commands-VEVMJTFS-OIYWEHUP.js +14 -0
- package/dist/kanban-commands-VEVMJTFS-OIYWEHUP.js.map +1 -0
- package/dist/package.json +36 -0
- package/dist/runeya +4 -0
- package/dist/web/assets/AddressBar.vue-dB66q4DS.js +1 -0
- package/dist/web/assets/AgentPage-B3wrH3gG.js +2 -0
- package/dist/web/assets/AgentPage-BTWkJvqr.css +1 -0
- package/dist/web/assets/AgentScalarChatInterface.vue-CJVuZIB9.js +13 -0
- package/dist/web/assets/AgentTerminalPage-Cj5fRr-j.js +36 -0
- package/dist/web/assets/AgentTerminalPage-EX_n6P3x.css +1 -0
- package/dist/web/assets/AiChatPage-Dhsx3B9B.js +1 -0
- package/dist/web/assets/ApiDocsPage-BddLJuUF.js +5 -0
- package/dist/web/assets/ApiDocsPage-D2Z0wqGZ.css +1 -0
- package/dist/web/assets/AppLayout-AfhaeKlp.js +1 -0
- package/dist/web/assets/AppLayout-sngalCCj.css +1 -0
- package/dist/web/assets/AuditPage-BBV9FW9y.css +1 -0
- package/dist/web/assets/AuditPage-DqycuiVb.js +1 -0
- package/dist/web/assets/CodeInput.vue-Dyew7ml-.js +1 -0
- package/dist/web/assets/Collection.vue-DePdVAHM.js +1 -0
- package/dist/web/assets/CollectionAuthentication.vue-DagSEg45.js +1 -0
- package/dist/web/assets/CollectionCookies.vue-vMKPCgg1.js +1 -0
- package/dist/web/assets/CollectionEnvironment.vue-B0JkZ6GC.js +1 -0
- package/dist/web/assets/CollectionOverview.vue-Bm7OsMWM.js +1 -0
- package/dist/web/assets/CollectionScripts.vue-CZiBq0rT.js +1 -0
- package/dist/web/assets/CollectionServers.vue-bziJbP-5.js +1 -0
- package/dist/web/assets/CollectionSettings.vue-D4oBu-fT.js +1 -0
- package/dist/web/assets/CollectionSync.vue-BG50-Lo4.js +1 -0
- package/dist/web/assets/CommandActionInput.vue-DmZld2w7.js +1 -0
- package/dist/web/assets/Cookies.vue-DjxMLL79.js +1 -0
- package/dist/web/assets/DashboardPage-QjYCF0Kd.js +1 -0
- package/dist/web/assets/DashboardPage-gZJ4_s8T.css +1 -0
- package/dist/web/assets/DataTable.vue-BV9IuUNB.js +1 -0
- package/dist/web/assets/DataTableCheckbox.vue-Cx0exaNK.js +1 -0
- package/dist/web/assets/DataTableHeader.vue-ZtUdyiLV.js +1 -0
- package/dist/web/assets/DataTableInput.vue-C4NF8kJn.js +1 -0
- package/dist/web/assets/DeleteSidebarListElement.vue-CcAW4Pdn.js +1 -0
- package/dist/web/assets/EditSidebarListElement.vue-Crbagha4.js +1 -0
- package/dist/web/assets/EditorIcon-BaDORp4k.js +15 -0
- package/dist/web/assets/EditorIcon-zS3bHXe1.css +1 -0
- package/dist/web/assets/EmptyState.vue-2hJbVxAi.js +22 -0
- package/dist/web/assets/Environment.vue-CcERFnQq.js +1 -0
- package/dist/web/assets/EnvironmentForm-DSKxdDGW.js +108 -0
- package/dist/web/assets/EnvironmentForm-DVMc303P.css +1 -0
- package/dist/web/assets/EnvironmentFormPage-BDhR07CG.js +1 -0
- package/dist/web/assets/EnvironmentFormPage-OaDJvyrc.css +1 -0
- package/dist/web/assets/EnvironmentListPage-BDqcug66.css +1 -0
- package/dist/web/assets/EnvironmentListPage-BzdxgZdS.js +1 -0
- package/dist/web/assets/EnvironmentModal.vue-DvsPa6V9.js +1 -0
- package/dist/web/assets/EnvironmentSelector-B9SZvB3I.css +1 -0
- package/dist/web/assets/EnvironmentSelector-BWljvJWP.js +1 -0
- package/dist/web/assets/Form.vue-BxhIukSx.js +1 -0
- package/dist/web/assets/IconSelector.vue-SxFpYToZ.js +1 -0
- package/dist/web/assets/KanbanBoardPage-7nOYpwHn.css +1 -0
- package/dist/web/assets/KanbanBoardPage-Bbyn-iLC.js +141 -0
- package/dist/web/assets/KanbanListPage-BEX3MKW0.js +1 -0
- package/dist/web/assets/KanbanListPage-DbdjvTCx.css +1 -0
- package/dist/web/assets/LaunchProjectPage-DB_XBa86.js +1 -0
- package/dist/web/assets/LaunchProjectPage-_L_i2xo0.css +1 -0
- package/dist/web/assets/LaunchServicesPage-BABQz-ey.css +1 -0
- package/dist/web/assets/LaunchServicesPage-fmsU-_p0.js +1 -0
- package/dist/web/assets/LogViewer-CJcXcTP0.css +1 -0
- package/dist/web/assets/LogViewer-CV9OmAb1.js +3 -0
- package/dist/web/assets/ProcessControls-CKmB6sB9.css +1 -0
- package/dist/web/assets/ProcessControls-L_hld0kN.js +1 -0
- package/dist/web/assets/ProcessDetailPage-B0qGKtvQ.css +1 -0
- package/dist/web/assets/ProcessDetailPage-CW0F6wvO.js +1 -0
- package/dist/web/assets/ProcessMetrics-BgEFMdnW.css +1 -0
- package/dist/web/assets/ProcessMetrics-D2vCK15o.js +1 -0
- package/dist/web/assets/ProjectDetailPage-Bo04MsdE.js +1 -0
- package/dist/web/assets/ProjectDetailPage-CZBB6F-t.css +1 -0
- package/dist/web/assets/ProjectListPage-BGU6SKAr.css +1 -0
- package/dist/web/assets/ProjectListPage-CG-r82FQ.js +1 -0
- package/dist/web/assets/RandomJobTestPage-C1mgTTSY.css +1 -0
- package/dist/web/assets/RandomJobTestPage-COnuE_dj.js +2 -0
- package/dist/web/assets/Request.vue-CeAzdpVl.js +1 -0
- package/dist/web/assets/RequestAuth.vue-DABBKM9M.js +1 -0
- package/dist/web/assets/RequestRoot.vue-CRaiGtgb.js +19 -0
- package/dist/web/assets/ScalarAsciiArt.vue-mR3JflbN.js +2 -0
- package/dist/web/assets/ScalarIconEyeSlash.vue-JQCpS43o.js +1 -0
- package/dist/web/assets/ScalarIconTrash.vue-D7zGeCPC.js +1 -0
- package/dist/web/assets/ScenarioEditorPage-BVnDp-fS.js +14 -0
- package/dist/web/assets/ScenarioEditorPage-CfBKebp6.css +1 -0
- package/dist/web/assets/ServerVariablesForm.vue-DbVG31Dx.js +1 -0
- package/dist/web/assets/ServiceControlsBar-Cp2VUifX.js +1 -0
- package/dist/web/assets/ServiceControlsBar-D_S_sGQj.css +1 -0
- package/dist/web/assets/ServiceDetailPage-BriHTCpT.css +1 -0
- package/dist/web/assets/ServiceDetailPage-DMoXJliU.js +2 -0
- package/dist/web/assets/ServiceFormPage-BXTTwyWP.js +1 -0
- package/dist/web/assets/ServiceFormPage-CyY-14jH.css +1 -0
- package/dist/web/assets/Settings.vue-BtjfBYMB.js +1 -0
- package/dist/web/assets/SettingsPage-BFqYvm6R.js +508 -0
- package/dist/web/assets/SettingsPage-vGhb_tlY.css +1 -0
- package/dist/web/assets/SetupKeyPage-CrmikLTx.js +1 -0
- package/dist/web/assets/SetupKeyPage-DoY1Ua1s.css +1 -0
- package/dist/web/assets/SetupPage-CRuL5LXc.js +1 -0
- package/dist/web/assets/SetupPage-_KXpCQSU.css +1 -0
- package/dist/web/assets/Sidebar.vue-CLpz7l3s.js +1 -0
- package/dist/web/assets/SidebarButton.vue-DAvh-OoW.js +1 -0
- package/dist/web/assets/SidebarListElement.vue-CfQ22Epo.js +1 -0
- package/dist/web/assets/UnlockPage-Cx3PYgUl.css +1 -0
- package/dist/web/assets/UnlockPage-UxunGumn.js +1 -0
- package/dist/web/assets/VariablesTable-BtdK5olT.css +1 -0
- package/dist/web/assets/VariablesTable-CKe8mApI.js +1 -0
- package/dist/web/assets/ViewLayout.vue-D30IFsIP.js +1 -0
- package/dist/web/assets/ViewLayoutContent.vue-B4BXKBtQ.js +1 -0
- package/dist/web/assets/ViewLayoutSection.vue-BGkXXzBQ.js +1 -0
- package/dist/web/assets/_plugin-vue_export-helper-C7ztIXtE.js +1 -0
- package/dist/web/assets/abap-C4tHUUCU.js +1 -0
- package/dist/web/assets/active-entities-DMSK8Kvo.js +1 -0
- package/dist/web/assets/apex-6cG6aG-w.js +1 -0
- package/dist/web/assets/api-reference-DUBKG98-.js +1 -0
- package/dist/web/assets/autocomplete-Bx5M86A5.js +308 -0
- package/dist/web/assets/azcli-51BngrSU.js +1 -0
- package/dist/web/assets/base64-uZi92-DX.js +1 -0
- package/dist/web/assets/bat-BDcdVSIt.js +1 -0
- package/dist/web/assets/bicep-Cg0BCcky.js +2 -0
- package/dist/web/assets/cameligo-C3ekVui9.js +1 -0
- package/dist/web/assets/card-6r6P_U-q.js +32 -0
- package/dist/web/assets/checkbox-CQpllPXd.js +141 -0
- package/dist/web/assets/chip-gp-_w98f.js +54 -0
- package/dist/web/assets/clojure-Ci5xNgh_.js +1 -0
- package/dist/web/assets/codicon-DCmgc-ay.ttf +0 -0
- package/dist/web/assets/coffee-xsRz4GKy.js +1 -0
- package/dist/web/assets/column-CE6TbiAC.js +763 -0
- package/dist/web/assets/core-CLjfGkKM.js +1 -0
- package/dist/web/assets/cpp-B2gW4e23.js +1 -0
- package/dist/web/assets/csharp-SRujvHqy.js +1 -0
- package/dist/web/assets/csp-Cr-ll6gP.js +1 -0
- package/dist/web/assets/css-BYTJZCno.js +3 -0
- package/dist/web/assets/cssMode-Bl7Y9u0B.js +4 -0
- package/dist/web/assets/cypher-AmQ0R_D3.js +1 -0
- package/dist/web/assets/dart-Du01a0J5.js +1 -0
- package/dist/web/assets/dist-CNJKy0Au.js +192 -0
- package/dist/web/assets/dist-DGrDIHmK.js +1 -0
- package/dist/web/assets/dist-DkaYBczY.js +1 -0
- package/dist/web/assets/dist-E9g7EMme.js +1 -0
- package/dist/web/assets/dist-wHtavuXf.js +33 -0
- package/dist/web/assets/divider-J1wJyhb6.js +82 -0
- package/dist/web/assets/dockerfile-Dtlk9wqf.js +1 -0
- package/dist/web/assets/ecl-CpmVnLkK.js +1 -0
- package/dist/web/assets/editor.store-CIIP294U.js +1 -0
- package/dist/web/assets/editor.worker-Di51weDy.js +12 -0
- package/dist/web/assets/elixir-B3MVAC8k.js +1 -0
- package/dist/web/assets/fieldset-BRuU3VW2.js +88 -0
- package/dist/web/assets/flow9-Chkly0RN.js +1 -0
- package/dist/web/assets/freemarker2-C-5i2Fhr.js +3 -0
- package/dist/web/assets/fsharp-CZvMkppk.js +1 -0
- package/dist/web/assets/go-dT2iT7lt.js +1 -0
- package/dist/web/assets/graphql-DmObWyBD.js +1 -0
- package/dist/web/assets/handlebars-Bq-uEMhK.js +1 -0
- package/dist/web/assets/hcl-D1x5Oyp4.js +1 -0
- package/dist/web/assets/html-B-mweV_C.js +1 -0
- package/dist/web/assets/htmlMode-BlnuAGDY.js +4 -0
- package/dist/web/assets/index-BRDI9Dib.css +1 -0
- package/dist/web/assets/index-gfmcW9Sb.js +4220 -0
- package/dist/web/assets/ini-Bg2o1S3s.js +1 -0
- package/dist/web/assets/java-XviKSSn5.js +1 -0
- package/dist/web/assets/javascript-D61EWPTf.js +1 -0
- package/dist/web/assets/jsonMode-DmSJWG69.js +10 -0
- package/dist/web/assets/julia-DfTIwUGh.js +1 -0
- package/dist/web/assets/keyboard-nBda2f6m.js +4 -0
- package/dist/web/assets/kotlin-CNaIBh9d.js +1 -0
- package/dist/web/assets/less-D7o76tXd.js +2 -0
- package/dist/web/assets/lexon-Dd374QjV.js +1 -0
- package/dist/web/assets/lib-CegStMAw.js +5 -0
- package/dist/web/assets/library-BwIJAfg0.js +1 -0
- package/dist/web/assets/liquid-BRXADGhu.js +1 -0
- package/dist/web/assets/lua-DZKuiFbY.js +1 -0
- package/dist/web/assets/m3-CbwRx9Bb.js +1 -0
- package/dist/web/assets/markdown-DwLB5Rib.js +1 -0
- package/dist/web/assets/mdx-DXlefD6G.js +1 -0
- package/dist/web/assets/mediaTypes-BtSbXDUA.js +2 -0
- package/dist/web/assets/message-EfwB0RVQ.js +316 -0
- package/dist/web/assets/minus-DCEEn9ly.js +2 -0
- package/dist/web/assets/mips-DLbIq1yM.js +1 -0
- package/dist/web/assets/msdax-D4IjoZ6m.js +1 -0
- package/dist/web/assets/multiselect-BMOAw1qo.js +251 -0
- package/dist/web/assets/mysql-DQL_jy6H.js +1 -0
- package/dist/web/assets/objective-c-D74wM5bv.js +1 -0
- package/dist/web/assets/pascal-5tRlZk4O.js +1 -0
- package/dist/web/assets/pascaligo-CAE4rAEt.js +1 -0
- package/dist/web/assets/password-B0kJu8RE.js +101 -0
- package/dist/web/assets/perl-DREAbuQT.js +1 -0
- package/dist/web/assets/pgsql-DASKdyAW.js +1 -0
- package/dist/web/assets/php-C37ZWqoO.js +1 -0
- package/dist/web/assets/pla-v5u9R8i1.js +1 -0
- package/dist/web/assets/plus-CaknAInj.js +197 -0
- package/dist/web/assets/postiats-Szt5m-7G.js +1 -0
- package/dist/web/assets/powerquery-BzVrUSu3.js +1 -0
- package/dist/web/assets/powershell-BdbPbX_X.js +1 -0
- package/dist/web/assets/pretty-ms-CG-W6pSW.js +202 -0
- package/dist/web/assets/primeicons-C6QP2o4f.woff2 +0 -0
- package/dist/web/assets/primeicons-DMOk5skT.eot +0 -0
- package/dist/web/assets/primeicons-Dr5RGzOO.svg +345 -0
- package/dist/web/assets/primeicons-MpK4pl85.ttf +0 -0
- package/dist/web/assets/primeicons-WjwUDZjB.woff +0 -0
- package/dist/web/assets/process.store-DxDr1XKZ.js +1 -0
- package/dist/web/assets/project.store-CUclo-tf.js +1 -0
- package/dist/web/assets/protobuf-qqDa50tu.js +2 -0
- package/dist/web/assets/pug-Cu20UQ5w.js +1 -0
- package/dist/web/assets/python-BeJzJfgr.js +1 -0
- package/dist/web/assets/qsharp-DcbHL5X7.js +1 -0
- package/dist/web/assets/r-Bvig6Flk.js +1 -0
- package/dist/web/assets/radiobutton-Dpp9kpvR.js +145 -0
- package/dist/web/assets/razor-C8GjTcdm.js +1 -0
- package/dist/web/assets/redis-BxHDcW3-.js +1 -0
- package/dist/web/assets/redshift-B8dvlzjH.js +1 -0
- package/dist/web/assets/restructuredtext-npodtAFM.js +1 -0
- package/dist/web/assets/router-BAq_YY48.js +1 -0
- package/dist/web/assets/ruby-DiofbcJD.js +1 -0
- package/dist/web/assets/rust-BjYid3-m.js +1 -0
- package/dist/web/assets/sb-CzcPAP71.js +1 -0
- package/dist/web/assets/scala-Ci4wFrYi.js +1 -0
- package/dist/web/assets/scheme-D3iWhvP7.js +1 -0
- package/dist/web/assets/scss-DdlqDgmu.js +3 -0
- package/dist/web/assets/settings.store-RtV37pb_.js +1 -0
- package/dist/web/assets/shell-Bawb9gbH.js +1 -0
- package/dist/web/assets/solidity-Z2Sq8PBC.js +1 -0
- package/dist/web/assets/sophia--yD-H1Ow.js +1 -0
- package/dist/web/assets/sparql-0vv3-wLi.js +1 -0
- package/dist/web/assets/sql-0gdWKhmJ.js +1 -0
- package/dist/web/assets/st-rE-x-DTZ.js +1 -0
- package/dist/web/assets/store-BSUCffsu.js +1840 -0
- package/dist/web/assets/style-4Pk2icOw.css +1 -0
- package/dist/web/assets/swift-CSKeG8Ne.js +1 -0
- package/dist/web/assets/systemverilog-CblNM3Im.js +1 -0
- package/dist/web/assets/tabpanel-CXo9Yhvl.js +150 -0
- package/dist/web/assets/tag-BsP7PdQ9.js +54 -0
- package/dist/web/assets/tcl-BYnzj-GZ.js +1 -0
- package/dist/web/assets/toggleswitch-C0fuTzJt.js +115 -0
- package/dist/web/assets/trpc-DgyerAaK.js +1 -0
- package/dist/web/assets/ts.worker-DHQ2j8_R.js +51339 -0
- package/dist/web/assets/tsMode-CaqfXb40.js +11 -0
- package/dist/web/assets/twig-DiGWiEtp.js +1 -0
- package/dist/web/assets/typescript-D23_zyMA.js +1 -0
- package/dist/web/assets/typespec-a6xMcpXw.js +1 -0
- package/dist/web/assets/urls-D4kou9RH.js +12 -0
- package/dist/web/assets/use-tree-walker-BebEauYQ.js +1 -0
- package/dist/web/assets/useAiChatDrawer-DDBZQU71.js +1 -0
- package/dist/web/assets/useClipboard-BgE-EP5h.js +1 -0
- package/dist/web/assets/useLayout-BtC8xLAa.js +1 -0
- package/dist/web/assets/usePluginManager-MFUURiUn.js +1 -0
- package/dist/web/assets/useSidebar-DC34K6Vb.js +1 -0
- package/dist/web/assets/uuid-B9GFVXPm.js +1 -0
- package/dist/web/assets/vb---51HVMC.js +1 -0
- package/dist/web/assets/vue-router-CCwpUNtv.js +1 -0
- package/dist/web/assets/w3c-keyname-DDCGDLuI.js +1 -0
- package/dist/web/assets/wgsl-2A8z4pT5.js +298 -0
- package/dist/web/assets/xml-e0SmIpRt.js +1 -0
- package/dist/web/assets/yaml-ChhAbF6s.js +1 -0
- package/dist/web/index.html +14 -0
- package/package.json +8 -8
- package/Dockerfile +0 -54
- package/scripts/post-build.mjs +0 -61
- package/src/__tests__/cli-port.test.ts +0 -93
- package/src/index.ts +0 -298
- package/src/port-resolution.ts +0 -19
- package/tsconfig.json +0 -9
- package/tsup.config.bundled_lh0xis3zdq.mjs +0 -10
- package/tsup.config.bundled_qj1zdvku09a.mjs +0 -10
- package/tsup.config.ts +0 -6
|
@@ -0,0 +1,508 @@
|
|
|
1
|
+
import{$i as e,Bi as t,Bn as n,Ca as r,Cn as i,Dn as a,Ea as o,Gn as s,Gr as ee,Hi as c,Ii as te,Qr as l,Tn as ne,U as u,V as re,W as ie,Wn as ae,Yn as oe,_i as d,ai as f,at as se,ci as p,d as m,di as h,ei as ce,et as g,f as _,fi as v,gi as y,ha as b,hn as x,ia as le,it as ue,j as S,ka as C,ki as de,l as w,li as T,ni as E,nt as fe,o as D,q as O,ra as k,ri as pe,rt as A,ui as j,yi as M,zn as me}from"./index-gfmcW9Sb.js";import{t as he}from"./editor.store-CIIP294U.js";import{t as N}from"./EditorIcon-BaDORp4k.js";import{t as P}from"./toggleswitch-C0fuTzJt.js";import{t as F}from"./card-6r6P_U-q.js";import{t as I}from"./message-EfwB0RVQ.js";import{t as L}from"./LogViewer-CV9OmAb1.js";import{t as ge}from"./settings.store-RtV37pb_.js";const _e=[{id:`scenarios`,title:`Scenario`,desc:`Events related to scenario execution and user actions.`,icon:`pi pi-sitemap`,items:[{key:`scenario_waiting_input`,label:`Scenario asks for input`,desc:`Notify when an scenario run pauses and waits for a user answer.`}]},{id:`ai-conversations`,title:`AI Conversations`,desc:`Notifications for AI flow completion and failures.`,icon:`pi pi-microchip-ai`,items:[{key:`ai_conversation_complete`,label:`AI conversation completed`,desc:`Notify when an AI conversation finishes successfully.`},{key:`ai_conversation_error`,label:`AI conversation error`,desc:`Notify when an AI conversation fails.`}]},{id:`services`,title:`Services`,desc:`Operational events from your managed services.`,icon:`pi pi-server`,items:[{key:`service_error_log`,label:`Service error logs`,desc:`Notify when a service emits an error/fatal log line.`},{key:`service_status_changed`,label:`Service status changes`,desc:`Notify on status transitions (starting/running/stopped/errored).`},{key:`service_health_changed`,label:`Service health changes`,desc:`Notify on health transitions (healthy/unhealthy/unknown).`}]}];var R={class:`api-keys-page`},z={class:`api-keys-page__header`},B={key:0,class:`api-keys-page__empty`},V={key:1,class:`api-keys-page__empty`},ve={key:2,class:`api-keys-list`},ye={class:`api-key-card__body`},be={class:`api-key-card__name`},xe={key:0,class:`badge badge--info`},H={class:`api-key-card__meta`},Se={class:`api-key-card__url-row`},Ce={class:`api-key-card__url`},we=[`title`,`onClick`],Te=[`title`,`onClick`],Ee={class:`api-key-card__skill`},De=[`onClick`],Oe={key:0,class:`skill-panel`},ke={class:`skill-panel__tools`},Ae=[`onClick`],je={class:`skill-panel__header`},Me={class:`skill-panel__hint`},Ne={class:`skill-panel__btns`},U=[`disabled`,`title`,`onClick`],W=[`title`,`onClick`],Pe={class:`skill-panel__code`},G={class:`api-key-card__actions`},Fe=[`title`,`onClick`],Ie=[`title`,`onClick`],Le={key:3,class:`api-key-form`},Re={class:`form-field`},ze={class:`form-field`},Be={key:0,class:`svc-list-container`},K={class:`svc-list-search`},Ve=[`placeholder`],He={class:`svc-list-scroll`},Ue={key:0,class:`form-hint svc-list-empty`},We=[`onClick`],Ge={class:`svc-perm-row__name`},Ke={class:`svc-perm-summary`},qe=[`title`,`onClick`],Je={key:0,class:`svc-perm-row__actions`},Ye=[`checked`,`onChange`],Xe={key:1,class:`svc-perm-row__envs`},Ze={class:`env-perm-row__name`},Qe=[`checked`,`onChange`],$e=[`checked`,`onChange`],et=[`checked`,`onChange`],tt=[`onClick`],nt={key:0,class:`env-add-row`},rt=[`onChange`],it={value:``,disabled:``,selected:``},at=[`value`],ot={key:1,class:`svc-add-row`},st={value:``,disabled:``,selected:``},ct=[`value`],lt={key:2,class:`form-hint`},ut={key:3,class:`form-hint`},dt={class:`import-modal__body`},ft={class:`import-modal__desc`},pt={class:`import-section`},mt={class:`svc-perm-row__actions`},ht=[`checked`,`onChange`],gt={class:`import-section`},_t={class:`import-section__label`},q={class:`svc-perm-row__envs`},vt={class:`env-perm-row__name`},J=[`checked`,`onChange`],Y=[`checked`,`onChange`],X=[`checked`,`onChange`],Z=[`onClick`],yt={key:0,class:`env-add-row`},bt={value:``,disabled:``,selected:``},xt=[`value`],St={class:`form-field`},Ct={class:`radio-group`},wt={class:`radio-label`},Tt={class:`radio-label`},Et={class:`form-actions`},Dt={class:`form-actions__right`},Ot=[`disabled`],kt=[`disabled`],At={key:0,class:`pi pi-spin pi-spinner`},jt={class:`renew-modal__title`},Mt={class:`renew-modal__body`},Nt=[`disabled`],Pt=[`disabled`],Ft=i(M({__name:`ApiKeysPage`,setup(n){let{t:i}=oe(),a=s(),ee=fe(),u=ue(),re=b([]),ie=b(!1),ae=p(()=>ee.services.map(e=>({id:e.id,name:e.name})));function se(e){return u.findServiceEnvironments(e).map(e=>{let t=e.activateOn?u.getById(e.activateOn):null;return{id:e.id,name:t?.name??e.name}})}let m=b(!1),g=b(null),_=b(``),S=b(!1),de=b(!1),w=b([]),E=b(new Set),D=b(``);function O(e){let t=new Set(E.value);t.has(e)?t.delete(e):t.add(e),E.value=t}let A=b(null),j=b(new Set),M=b(new Map),me=b(null),he=b(null),N=b(!1),P=b(!1),F=b(!1),I=b([`service:read`]),L=b([]);function ge(){I.value=[`service:read`],L.value=[],F.value=!0}function _e(e){I.value=I.value.includes(e)?I.value.filter(t=>t!==e):[...I.value,e]}function Ft(e){L.value=[...L.value,{environmentId:e,actions:[`env:read`],includeSecrets:!1}]}function It(e){L.value=L.value.filter((t,n)=>n!==e)}function Lt(e,t){L.value=L.value.map((n,r)=>{if(r!==e)return n;let i=n.actions.includes(t)?n.actions.filter(e=>e!==t):[...n.actions,t];return{...n,actions:i}})}function Rt(e){L.value=L.value.map((t,n)=>n===e?{...t,includeSecrets:!t.includeSecrets}:t)}let zt=p(()=>{let e=new Set(L.value.map(e=>e.environmentId));return u.globalEnvironments.filter(t=>!e.has(t.id))});function Bt(){let e=Q.value;if(e.length===0){F.value=!1;return}let t=e.map(e=>({serviceId:e.id,actions:[...I.value],environments:L.value.flatMap(t=>{let n=u.findServiceEnvironment(e.id,t.environmentId);return n?[{environmentId:n.id,actions:[...t.actions],includeSecrets:t.includeSecrets}]:[]})}));w.value=[...w.value,...t],F.value=!1}let Vt=[{id:`claude`,label:`Claude Code`,file:`.claude/skills/runeya/SKILL.md`,hint:`Create`,canWrite:!0},{id:`gemini`,label:`Gemini CLI`,file:`GEMINI.md`,hint:`Insert into`,canWrite:!1},{id:`codex`,label:`Codex CLI`,file:`AGENTS.md`,hint:`Insert into`,canWrite:!1},{id:`cursor`,label:`Cursor`,file:`.cursor/rules/runeya.mdc`,hint:`Create`,canWrite:!0},{id:`copilot`,label:`Copilot`,file:`.github/copilot-instructions.md`,hint:`Insert into`,canWrite:!1},{id:`windsurf`,label:`Windsurf`,file:`.windsurf/rules/runeya.md`,hint:`Create`,canWrite:!0}],Ht=[{value:`service:read`,label:i(`apiKeysPage.read`)},{value:`logs:read`,label:`Logs`},{value:`service:status`,label:i(`actions.status`,`Status`)},{value:`service:healthcheck`,label:`Healthcheck`},{value:`service:start`,label:i(`actions.start`)},{value:`service:stop`,label:i(`actions.stop`)},{value:`service:restart`,label:i(`actions.restart`)}],Ut=p(()=>new Set(w.value.map(e=>e.serviceId))),Wt=p(()=>{let e=D.value.trim().toLowerCase();return e?w.value.map((e,t)=>({perm:e,idx:t})).filter(({perm:t})=>En(t.serviceId).toLowerCase().includes(e)):w.value.map((e,t)=>({perm:e,idx:t}))}),Q=p(()=>ae.value.filter(e=>!Ut.value.has(e.id)));function $(e){return M.value.get(e)??`claude`}function Gt(e,t){let n=new Map(M.value);n.set(e,t),M.value=n}async function Kt(){ie.value=!0;try{re.value=await x.apiKeys.list.query()}catch(e){a.add({severity:`error`,summary:i(`apiKeysPage.error`),detail:e.message,life:4e3})}finally{ie.value=!1}}te(Kt);function qt(e){return`http://localhost:${window.location.port||`4000`}/${e.key}/llms.txt`}function Jt(e){let t=e.services.length;return i(`apiKeysPage.scopeSummary`,t,{named:{count:t}})}function Yt(e){return{serviceId:e,actions:[`service:read`],environments:[]}}function Xt(){g.value=null,_.value=``,S.value=!1,w.value=[],E.value=new Set,D.value=``,m.value=!0}function Zt(e){dn=!0,g.value=e.id,_.value=e.name,S.value=e.isPublic,w.value=e.scopes.services.map(e=>({serviceId:e.serviceId,actions:[...e.actions],environments:e.environments.map(e=>({environmentId:e.environmentId,actions:[...e.actions],includeSecrets:e.includeSecrets}))})),E.value=new Set,D.value=``,N.value=!1,m.value=!0}function Qt(){m.value=!1,g.value=null}function $t(e){let t=w.value.length;w.value=[...w.value,Yt(e)],E.value=new Set([...E.value,t])}function en(e){w.value=w.value.filter((t,n)=>n!==e)}function tn(e,t){let n=w.value[e],r=n.actions.includes(t)?n.actions.filter(e=>e!==t):[...n.actions,t];w.value=w.value.map((t,n)=>n===e?{...t,actions:r}:t)}function nn(e){return new Set(w.value[e].environments.map(e=>e.environmentId))}function rn(e){let t=nn(e),n=w.value[e]?.serviceId;return n?se(n).filter(e=>!t.has(e.id)):[]}function an(e,t){let n={environmentId:t,actions:[`env:read`],includeSecrets:!1};w.value=w.value.map((t,r)=>r===e?{...t,environments:[...t.environments,n]}:t)}function on(e,t){w.value=w.value.map((n,r)=>r===e?{...n,environments:n.environments.filter((e,n)=>n!==t)}:n)}function sn(e,t,n){w.value=w.value.map((r,i)=>{if(i!==e)return r;let a=r.environments.map((e,r)=>{if(r!==t)return e;let i=e.actions.includes(n)?e.actions.filter(e=>e!==n):[...e.actions,n];return{...e,actions:i}});return{...r,environments:a}})}function cn(e,t){w.value=w.value.map((n,r)=>{if(r!==e)return n;let i=n.environments.map((e,n)=>n===t?{...e,includeSecrets:!e.includeSecrets}:e);return{...n,environments:i}})}function ln(){return{services:w.value.map(e=>({serviceId:e.serviceId,actions:e.actions,environments:e.environments.map(e=>({environmentId:e.environmentId,actions:e.actions,includeSecrets:e.includeSecrets}))}))}}let un=null,dn=!1;e([w,S],()=>{if(g.value){if(dn){dn=!1;return}un&&clearTimeout(un),un=setTimeout(async()=>{try{let e=ln();await x.apiKeys.update.mutate({id:g.value,name:_.value.trim(),scopes:e,isPublic:S.value}),re.value=await x.apiKeys.list.query()}catch(e){a.add({severity:`error`,summary:i(`apiKeysPage.error`),detail:e.message,life:5e3})}},300)}},{deep:!0});async function fn(){if(!_.value.trim()){a.add({severity:`warn`,summary:i(`validation.requiredField`,`Required field`),detail:i(`validation.nameRequired`,`Name is required`),life:3e3});return}de.value=!0;try{let e=ln();g.value?(await x.apiKeys.update.mutate({id:g.value,name:_.value.trim(),scopes:e,isPublic:S.value}),a.add({severity:`success`,summary:i(`apiKeysPage.updated`),detail:i(`apiKeysPage.keyUpdated`),life:3e3})):(await x.apiKeys.create.mutate({name:_.value.trim(),scopes:e,isPublic:S.value}),a.add({severity:`success`,summary:i(`apiKeysPage.keyCreated`),life:3e3})),Qt(),await Kt()}catch(e){a.add({severity:`error`,summary:i(`apiKeysPage.error`),detail:e.message,life:5e3})}finally{de.value=!1}}async function pn(e){try{await x.apiKeys.remove.mutate({id:e}),await Kt(),a.add({severity:`success`,summary:i(`apiKeysPage.deleted`),detail:i(`apiKeysPage.keyRevoked`),life:3e3})}catch(e){a.add({severity:`error`,summary:i(`apiKeysPage.error`),detail:e.message,life:4e3})}}async function mn(e,t){await navigator.clipboard.writeText(e),A.value=t,setTimeout(()=>{A.value=null},2e3)}function hn(e){let t=new Set(j.value);t.has(e)?t.delete(e):t.add(e),j.value=t}function gn(e){let t=qt(e),n=e.scopes.services.map(e=>ae.value.find(t=>t.id===e.serviceId)?.name??e.serviceId),r=n.length===0?`No services accessible.`:`Accessible services: ${n.join(`, `)}.`,i={"service:read":`read service configs and status`,"logs:read":`read service logs`,"service:status":`get service status`,"service:healthcheck":`get service health`,"service:start":`start services`,"service:stop":`stop services`,"service:restart":`restart services`,"env:read":`read environment variables`,"env:write":`write environment variables`};return{url:t,scopeLines:r,actionList:[...new Set(e.scopes.services.flatMap(e=>[...e.actions,...e.environments.flatMap(e=>e.actions)]))].map(e=>`- ${i[e]??e}`).join(`
|
|
2
|
+
`)}}function _n(e){let{url:t,scopeLines:n,actionList:r}=gn(e);return`# Runeya — ${e.name}
|
|
3
|
+
|
|
4
|
+
Manage and monitor local development services via the Runeya instance running on this machine.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
|
|
8
|
+
Before answering any question about services, their status, or their logs, fetch the llms.txt:
|
|
9
|
+
|
|
10
|
+
\`\`\`
|
|
11
|
+
${t}
|
|
12
|
+
\`\`\`
|
|
13
|
+
|
|
14
|
+
${n}
|
|
15
|
+
|
|
16
|
+
## Permissions
|
|
17
|
+
|
|
18
|
+
${r}
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
- Fetch the llms.txt URL above to discover available services and their current status.
|
|
23
|
+
- Use the documented API endpoints to start, stop, restart services or read their logs.
|
|
24
|
+
- Always re-fetch the llms.txt if the user asks about a service you don't have info on yet.
|
|
25
|
+
|
|
26
|
+
## Important
|
|
27
|
+
|
|
28
|
+
**Always use \`curl\` (or equivalent HTTP client like \`fetch\`, \`axios\`, \`httpx\`) to call the API — never open a browser or use browser automation tools.**
|
|
29
|
+
`}function vn(e){let{url:t,scopeLines:n,actionList:r}=gn(e);return`## Runeya — ${e.name}
|
|
30
|
+
|
|
31
|
+
You have access to a Runeya instance for managing local development services.
|
|
32
|
+
|
|
33
|
+
Before answering any question about services, fetch the llms.txt endpoint for up-to-date context:
|
|
34
|
+
|
|
35
|
+
\`\`\`
|
|
36
|
+
${t}
|
|
37
|
+
\`\`\`
|
|
38
|
+
|
|
39
|
+
${n}
|
|
40
|
+
|
|
41
|
+
Allowed actions:
|
|
42
|
+
${r}
|
|
43
|
+
|
|
44
|
+
Always re-fetch the llms.txt if the user asks about a service not yet in context.
|
|
45
|
+
|
|
46
|
+
**Always use \`curl\` or an HTTP client to call the API — never use a browser or browser automation.**
|
|
47
|
+
`}function yn(e){let{url:t,scopeLines:n,actionList:r}=gn(e);return`## Runeya — ${e.name}
|
|
48
|
+
|
|
49
|
+
You can manage local development services via the Runeya instance on this machine.
|
|
50
|
+
|
|
51
|
+
Fetch the following URL for up-to-date service context before answering service-related questions:
|
|
52
|
+
|
|
53
|
+
\`\`\`
|
|
54
|
+
${t}
|
|
55
|
+
\`\`\`
|
|
56
|
+
|
|
57
|
+
${n}
|
|
58
|
+
|
|
59
|
+
Allowed actions:
|
|
60
|
+
${r}
|
|
61
|
+
|
|
62
|
+
**Always use \`curl\` or an HTTP client to call the API — never use a browser or browser automation.**
|
|
63
|
+
`}function bn(e){let{url:t,scopeLines:n,actionList:r}=gn(e);return`---
|
|
64
|
+
description: Runeya local service manager (${e.name})
|
|
65
|
+
alwaysApply: false
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
# Runeya — ${e.name}
|
|
69
|
+
|
|
70
|
+
Manage and monitor local development services via the Runeya instance on this machine.
|
|
71
|
+
|
|
72
|
+
When the user asks about services, their status, or logs, fetch the llms.txt first:
|
|
73
|
+
|
|
74
|
+
\`\`\`
|
|
75
|
+
${t}
|
|
76
|
+
\`\`\`
|
|
77
|
+
|
|
78
|
+
${n}
|
|
79
|
+
|
|
80
|
+
Allowed actions:
|
|
81
|
+
${r}
|
|
82
|
+
|
|
83
|
+
**Always use \`curl\` or an HTTP client to call the API — never use a browser or browser automation.**
|
|
84
|
+
`}function xn(e){let{url:t,scopeLines:n,actionList:r}=gn(e);return`## Runeya — ${e.name}
|
|
85
|
+
|
|
86
|
+
When asked about local development services, fetch the Runeya llms.txt for context:
|
|
87
|
+
|
|
88
|
+
\`\`\`
|
|
89
|
+
${t}
|
|
90
|
+
\`\`\`
|
|
91
|
+
|
|
92
|
+
${n}
|
|
93
|
+
|
|
94
|
+
Allowed actions:
|
|
95
|
+
${r}
|
|
96
|
+
|
|
97
|
+
**Always use \`curl\` or an HTTP client to call the API — never use a browser or browser automation.**
|
|
98
|
+
`}function Sn(e){let{url:t,scopeLines:n,actionList:r}=gn(e);return`---
|
|
99
|
+
trigger: manual
|
|
100
|
+
description: Runeya local service manager (${e.name})
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
# Runeya — ${e.name}
|
|
104
|
+
|
|
105
|
+
Manage and monitor local development services via the Runeya instance on this machine.
|
|
106
|
+
|
|
107
|
+
Fetch the llms.txt before answering service-related questions:
|
|
108
|
+
|
|
109
|
+
\`\`\`
|
|
110
|
+
${t}
|
|
111
|
+
\`\`\`
|
|
112
|
+
|
|
113
|
+
${n}
|
|
114
|
+
|
|
115
|
+
Allowed actions:
|
|
116
|
+
${r}
|
|
117
|
+
|
|
118
|
+
**Always use \`curl\` or an HTTP client to call the API — never use a browser or browser automation.**
|
|
119
|
+
`}function Cn(e,t){switch(t){case`gemini`:return vn(e);case`codex`:return yn(e);case`cursor`:return bn(e);case`copilot`:return xn(e);case`windsurf`:return Sn(e);default:return _n(e)}}async function wn(){if(g.value){P.value=!0;try{await x.apiKeys.renewKey.mutate({id:g.value}),await Kt(),N.value=!1,a.add({severity:`success`,summary:i(`apiKeysPage.keyRenewed`),detail:i(`apiKeysPage.oldKeyRevoked`),life:4e3})}catch(e){a.add({severity:`error`,summary:i(`apiKeysPage.error`),detail:e.message,life:5e3})}finally{P.value=!1}}}async function Tn(e,t){me.value=e.id;try{let n=Cn(e,t.id);await x.apiKeys.writeSkillFile.mutate({relativePath:t.file,content:n}),he.value=e.id,a.add({severity:`success`,summary:i(`apiKeysPage.written`),detail:t.file,life:3e3}),setTimeout(()=>{he.value=null},2500)}catch(e){a.add({severity:`error`,summary:i(`apiKeysPage.error`),detail:e.message,life:5e3})}finally{me.value=null}}function En(e){return ae.value.find(t=>t.id===e)?.name??e}function Dn(e){let t=u.getById(e);return t?(t.activateOn?u.getById(t.activateOn):null)?.name??t.name:e}return(e,n)=>(t(),v(`div`,R,[T(`div`,z,[m.value?h(``,!0):(t(),v(`button`,{key:0,class:`btn btn--primary`,onClick:Xt},[n[12]||=T(`i`,{class:`pi pi-plus`},null,-1),y(` `+C(r(i)(`apiKeysPage.newApiKey`)),1)]))]),ie.value?(t(),v(`div`,B,C(r(i)(`apiKeysPage.loading`)),1)):re.value.length===0&&!m.value?(t(),v(`div`,V,C(r(i)(`apiKeysPage.noApiKey`)),1)):h(``,!0),m.value?h(``,!0):(t(),v(`div`,ve,[(t(!0),v(f,null,c(re.value,e=>(t(),v(`div`,{key:e.id,class:`api-key-card`},[T(`div`,ye,[T(`div`,be,[n[13]||=T(`i`,{class:`pi pi-key`},null,-1),y(` `+C(e.name)+` `,1),e.isPublic?(t(),v(`span`,xe,C(r(i)(`apiKeysPage.shareable`)),1)):h(``,!0)]),T(`div`,H,C(r(i)(`apiKeysPage.createdOn`))+` `+C(new Date(e.createdAt).toLocaleDateString())+` · `+C(Jt(e.scopes)),1),T(`div`,Se,[T(`code`,Ce,C(qt(e)),1),T(`button`,{class:`btn btn--ghost btn--xs`,title:A.value===e.id+`url`?r(i)(`apiKeysPage.copied`):r(i)(`apiKeysPage.copyUrl`),onClick:t=>mn(qt(e),e.id+`url`)},[T(`i`,{class:o(A.value===e.id+`url`?`pi pi-check`:`pi pi-copy`)},null,2)],8,we),T(`button`,{class:`btn btn--ghost btn--xs`,title:A.value===e.id+`key`?r(i)(`apiKeysPage.copied`):r(i)(`apiKeysPage.copyKeyOnly`),onClick:t=>mn(e.key,e.id+`key`)},[T(`i`,{class:o(A.value===e.id+`key`?`pi pi-check`:`pi pi-key`)},null,2)],8,Te)]),T(`div`,Ee,[T(`button`,{class:`btn btn--ghost btn--xs skill-toggle`,onClick:t=>hn(e.id)},[n[14]||=T(`i`,{class:`pi pi-bolt`},null,-1),y(` `+C(r(i)(`apiKeysPage.aiIntegration`))+` `,1),T(`i`,{class:o(j.value.has(e.id)?`pi pi-chevron-up`:`pi pi-chevron-down`)},null,2)],8,De),j.value.has(e.id)?(t(),v(`div`,Oe,[T(`div`,ke,[(t(),v(f,null,c(Vt,t=>T(`button`,{key:t.id,class:o([`skill-tool-btn`,{"skill-tool-btn--active":$(e.id)===t.id}]),onClick:n=>Gt(e.id,t.id)},C(t.label),11,Ae)),64))]),T(`div`,je,[T(`span`,Me,[y(C(Vt.find(t=>t.id===$(e.id))?.hint)+` `,1),T(`code`,null,C(Vt.find(t=>t.id===$(e.id))?.file),1)]),T(`div`,Ne,[Vt.find(t=>t.id===$(e.id))?.canWrite?(t(),v(`button`,{key:0,class:`btn btn--ghost btn--xs`,disabled:me.value===e.id,title:he.value===e.id?r(i)(`apiKeysPage.written`):r(i)(`apiKeysPage.writeFileToDisk`),onClick:t=>Tn(e,Vt.find(t=>t.id===$(e.id)))},[T(`i`,{class:o(me.value===e.id?`pi pi-spin pi-spinner`:he.value===e.id?`pi pi-check`:`pi pi-file-edit`)},null,2),y(` `+C(he.value===e.id?r(i)(`apiKeysPage.written`):r(i)(`apiKeysPage.write`)),1)],8,U)):h(``,!0),T(`button`,{class:`btn btn--ghost btn--xs`,title:A.value===e.id+`skill`?r(i)(`apiKeysPage.copied`):r(i)(`apiKeysPage.copy`),onClick:t=>mn(Cn(e,$(e.id)),e.id+`skill`)},[T(`i`,{class:o(A.value===e.id+`skill`?`pi pi-check`:`pi pi-copy`)},null,2),y(` `+C(A.value===e.id+`skill`?r(i)(`apiKeysPage.copied`):r(i)(`apiKeysPage.copy`)),1)],8,W)])]),T(`pre`,Pe,C(Cn(e,$(e.id))),1)])):h(``,!0)])]),T(`div`,G,[T(`button`,{class:`btn btn--ghost btn--xs`,title:r(i)(`apiKeysPage.editKey`),onClick:t=>Zt(e)},[...n[15]||=[T(`i`,{class:`pi pi-pencil`},null,-1)]],8,Fe),T(`button`,{class:`btn btn--danger btn--xs`,title:r(i)(`apiKeysPage.revokeKey`),onClick:t=>pn(e.id)},[...n[16]||=[T(`i`,{class:`pi pi-trash`},null,-1)]],8,Ie)])]))),128))])),m.value?(t(),v(`div`,Le,[T(`h2`,null,C(g.value?r(i)(`apiKeysPage.editOrNewTitle`):r(i)(`apiKeysPage.newTitle`)),1),T(`div`,Re,[T(`label`,null,C(r(i)(`apiKeysPage.keyNameLabel`)),1),le(T(`input`,{"onUpdate:modelValue":n[0]||=e=>_.value=e,type:`text`,class:`form-input`,placeholder:`ex. Claude Desktop`,maxlength:`200`},null,512),[[ce,_.value]])]),T(`div`,ze,[T(`label`,null,C(r(i)(`apiKeysPage.servicesAndPermissions`)),1),w.value.length>0?(t(),v(`div`,Be,[T(`div`,K,[n[18]||=T(`i`,{class:`pi pi-search svc-list-search__icon`},null,-1),le(T(`input`,{"onUpdate:modelValue":n[1]||=e=>D.value=e,type:`text`,class:`svc-list-search__input`,placeholder:r(i)(`apiKeysPage.searchService`)},null,8,Ve),[[ce,D.value]]),D.value?(t(),v(`button`,{key:0,class:`svc-list-search__clear`,onClick:n[2]||=e=>D.value=``},[...n[17]||=[T(`i`,{class:`pi pi-times`},null,-1)]])):h(``,!0)]),T(`div`,He,[Wt.value.length===0?(t(),v(`p`,Ue,C(r(i)(`apiKeysPage.noResults`)),1)):h(``,!0),(t(!0),v(f,null,c(Wt.value,({perm:e,idx:a})=>(t(),v(`div`,{key:e.serviceId,class:`svc-perm-row`},[T(`div`,{class:`svc-perm-row__header`,onClick:e=>O(a)},[T(`span`,Ge,[T(`i`,{class:o([E.value.has(a)?`pi pi-chevron-down`:`pi pi-chevron-right`,`svc-chevron`])},null,2),n[19]||=T(`i`,{class:`pi pi-server`},null,-1),y(` `+C(En(e.serviceId))+` `,1),T(`span`,Ke,[y(C(e.actions.length)+` action`+C(e.actions.length===1?``:`s`)+` `,1),e.environments.length>0?(t(),v(f,{key:0},[y(`· `+C(e.environments.length)+` env`,1)],64)):h(``,!0)])]),T(`button`,{class:`btn btn--ghost btn--xs`,title:r(i)(`apiKeysPage.removeService`),onClick:pe(e=>en(a),[`stop`])},[...n[20]||=[T(`i`,{class:`pi pi-times`},null,-1)]],8,qe)],8,We),E.value.has(a)?(t(),v(`div`,Je,[(t(),v(f,null,c(Ht,t=>T(`label`,{key:t.value,class:o([`action-chip`,{"action-chip--on":e.actions.includes(t.value)}])},[T(`input`,{type:`checkbox`,checked:e.actions.includes(t.value),onChange:e=>tn(a,t.value)},null,40,Ye),y(` `+C(t.label),1)],2)),64))])):h(``,!0),E.value.has(a)?(t(),v(`div`,Xe,[(t(!0),v(f,null,c(e.environments,(e,s)=>(t(),v(`div`,{key:e.environmentId,class:`env-perm-row`},[T(`span`,Ze,[n[21]||=T(`i`,{class:`pi pi-globe`},null,-1),y(` `+C(Dn(e.environmentId)),1)]),T(`label`,{class:o([`action-chip`,{"action-chip--on":e.actions.includes(`env:read`)}])},[T(`input`,{type:`checkbox`,checked:e.actions.includes(`env:read`),onChange:e=>sn(a,s,`env:read`)},null,40,Qe),y(` `+C(r(i)(`apiKeysPage.read`)),1)],2),e.actions.includes(`env:read`)?(t(),v(`label`,{key:0,class:o([`action-chip action-chip--sub`,{"action-chip--on":e.includeSecrets}])},[T(`input`,{type:`checkbox`,checked:e.includeSecrets,onChange:e=>cn(a,s)},null,40,$e),y(` `+C(r(i)(`apiKeysPage.secrets`)),1)],2)):h(``,!0),T(`label`,{class:o([`action-chip`,{"action-chip--on":e.actions.includes(`env:write`)}])},[T(`input`,{type:`checkbox`,checked:e.actions.includes(`env:write`),onChange:e=>sn(a,s,`env:write`)},null,40,et),y(` `+C(r(i)(`apiKeysPage.writePermission`)),1)],2),T(`button`,{class:`btn btn--ghost btn--xs`,onClick:e=>on(a,s)},[...n[22]||=[T(`i`,{class:`pi pi-times`},null,-1)]],8,tt)]))),128)),rn(a).length>0?(t(),v(`div`,nt,[T(`select`,{class:`form-select form-select--sm`,onChange:e=>{an(a,e.target.value),e.target.value=``}},[T(`option`,it,C(r(i)(`apiKeysPage.addEnvironment`)),1),(t(!0),v(f,null,c(rn(a),e=>(t(),v(`option`,{key:e.id,value:e.id},C(e.name),9,at))),128))],40,rt)])):h(``,!0)])):h(``,!0)]))),128))])])):h(``,!0),Q.value.length>0?(t(),v(`div`,ot,[T(`select`,{class:`form-select`,onChange:n[3]||=e=>{$t(e.target.value),e.target.value=``}},[T(`option`,st,C(r(i)(`apiKeysPage.addService`)),1),(t(!0),v(f,null,c(Q.value,e=>(t(),v(`option`,{key:e.id,value:e.id},C(e.name),9,ct))),128))],32),T(`button`,{class:`btn btn--ghost btn--sm`,onClick:ge},[n[23]||=T(`i`,{class:`pi pi-download`},null,-1),y(` `+C(r(i)(`apiKeysPage.importMissing`))+` (`+C(Q.value.length)+`) `,1)])])):ae.value.length===0?(t(),v(`p`,lt,C(r(i)(`apiKeysPage.noServicesAvailable`)),1)):Q.value.length===0?(t(),v(`p`,ut,C(r(i)(`apiKeysPage.allServicesAdded`)),1)):h(``,!0),d(r(ne),{visible:F.value,"onUpdate:visible":n[6]||=e=>F.value=e,modal:``,header:r(i)(`apiKeysPage.importMissingHeader`),style:{width:`480px`}},{footer:k(()=>[T(`button`,{class:`btn btn--ghost`,onClick:n[5]||=e=>F.value=!1},C(r(i)(`actions.cancel`)),1),T(`button`,{class:`btn btn--primary`,onClick:Bt},[n[27]||=T(`i`,{class:`pi pi-download`},null,-1),y(` `+C(r(i)(`apiKeysPage.importServices`,{count:Q.value.length})),1)])]),default:k(()=>[T(`div`,dt,[T(`p`,ft,[T(`strong`,null,C(Q.value.length),1),y(` service`+C(Q.value.length===1?``:`s`)+` `+C(r(i)(`apiKeysPage.willBeAdded`)),1)]),T(`div`,pt,[n[24]||=T(`div`,{class:`import-section__label`},`Actions`,-1),T(`div`,mt,[(t(),v(f,null,c(Ht,e=>T(`label`,{key:e.value,class:o([`action-chip`,{"action-chip--on":I.value.includes(e.value)}])},[T(`input`,{type:`checkbox`,checked:I.value.includes(e.value),onChange:t=>_e(e.value)},null,40,ht),y(` `+C(e.label),1)],2)),64))])]),T(`div`,gt,[T(`div`,_t,C(r(i)(`apiKeysPage.environments`)),1),T(`div`,q,[(t(!0),v(f,null,c(L.value,(e,a)=>(t(),v(`div`,{key:e.environmentId,class:`env-perm-row`},[T(`span`,vt,[n[25]||=T(`i`,{class:`pi pi-globe`},null,-1),y(` `+C(Dn(e.environmentId)),1)]),T(`label`,{class:o([`action-chip`,{"action-chip--on":e.actions.includes(`env:read`)}])},[T(`input`,{type:`checkbox`,checked:e.actions.includes(`env:read`),onChange:e=>Lt(a,`env:read`)},null,40,J),y(` `+C(r(i)(`apiKeysPage.read`)),1)],2),e.actions.includes(`env:read`)?(t(),v(`label`,{key:0,class:o([`action-chip action-chip--sub`,{"action-chip--on":e.includeSecrets}])},[T(`input`,{type:`checkbox`,checked:e.includeSecrets,onChange:e=>Rt(a)},null,40,Y),y(` `+C(r(i)(`apiKeysPage.secrets`)),1)],2)):h(``,!0),T(`label`,{class:o([`action-chip`,{"action-chip--on":e.actions.includes(`env:write`)}])},[T(`input`,{type:`checkbox`,checked:e.actions.includes(`env:write`),onChange:e=>Lt(a,`env:write`)},null,40,X),y(` `+C(r(i)(`apiKeysPage.writePermission`)),1)],2),T(`button`,{class:`btn btn--ghost btn--xs`,onClick:e=>It(a)},[...n[26]||=[T(`i`,{class:`pi pi-times`},null,-1)]],8,Z)]))),128)),zt.value.length>0?(t(),v(`div`,yt,[T(`select`,{class:`form-select form-select--sm`,onChange:n[4]||=e=>{Ft(e.target.value),e.target.value=``}},[T(`option`,bt,C(r(i)(`apiKeysPage.addEnvironment`)),1),(t(!0),v(f,null,c(zt.value,e=>(t(),v(`option`,{key:e.id,value:e.id},C(e.name),9,xt))),128))],32)])):h(``,!0)])])])]),_:1},8,[`visible`,`header`])]),T(`div`,St,[T(`label`,null,C(r(i)(`apiKeysPage.storageLabel`)),1),T(`div`,Ct,[T(`label`,wt,[le(T(`input`,{"onUpdate:modelValue":n[7]||=e=>S.value=e,value:!1,type:`radio`},null,512),[[l,S.value]]),y(` `+C(r(i)(`apiKeysPage.privateOnly`))+` (`,1),n[28]||=T(`code`,null,`api-keys.private.json`,-1),y(` `+C(r(i)(`apiKeysPage.privateOnlyHint`))+`) `,1)]),T(`label`,Tt,[le(T(`input`,{"onUpdate:modelValue":n[8]||=e=>S.value=e,value:!0,type:`radio`},null,512),[[l,S.value]]),y(` `+C(r(i)(`apiKeysPage.shareableLabel`))+` (`,1),n[29]||=T(`code`,null,`api-keys.json`,-1),y(` `+C(r(i)(`apiKeysPage.shareableHint`))+`) `,1)])])]),T(`div`,Et,[g.value?(t(),v(`button`,{key:0,class:`btn btn--ghost btn--renew`,onClick:n[9]||=e=>N.value=!0},[n[30]||=T(`i`,{class:`pi pi-refresh`},null,-1),y(` `+C(r(i)(`apiKeysPage.renewKey`)),1)])):h(``,!0),T(`div`,Dt,[T(`button`,{class:`btn btn--ghost`,disabled:de.value,onClick:Qt},C(r(i)(`actions.cancel`)),9,Ot),T(`button`,{class:`btn btn--primary`,disabled:de.value,onClick:fn},[de.value?(t(),v(`i`,At)):h(``,!0),y(` `+C(g.value?r(i)(`apiKeysPage.saveOrCreate`):r(i)(`apiKeysPage.createKey`)),1)],8,kt)])]),d(r(ne),{visible:N.value,"onUpdate:visible":n[11]||=e=>N.value=e,modal:``,style:{width:`420px`}},{header:k(()=>[T(`span`,jt,[n[31]||=T(`i`,{class:`pi pi-exclamation-triangle renew-modal__title-icon`},null,-1),y(` `+C(r(i)(`apiKeysPage.renewKeyHeader`)),1)])]),footer:k(()=>[T(`button`,{class:`btn btn--ghost`,disabled:P.value,onClick:n[10]||=e=>N.value=!1},C(r(i)(`actions.cancel`)),9,Nt),T(`button`,{class:`btn btn--danger`,disabled:P.value,onClick:wn},[T(`i`,{class:o(P.value?`pi pi-spin pi-spinner`:`pi pi-refresh`)},null,2),y(` `+C(r(i)(`apiKeysPage.renewKey`)),1)],8,Pt)]),default:k(()=>[T(`div`,Mt,[T(`p`,null,C(r(i)(`apiKeysPage.renewBodyLine1`)),1),T(`p`,null,C(r(i)(`apiKeysPage.renewBodyLine2`)),1)])]),_:1},8,[`visible`])])):h(``,!0)]))}}),[[`__scopeId`,`data-v-edcf94f2`]]),It={class:`settings-page`},Lt={class:`settings-layout`},Rt={class:`settings-nav`},zt={class:`settings-nav__title`},Bt={class:`settings-nav__list`},Vt=[`onClick`],Ht={class:`settings-content`},Ut={class:`section-header`},Wt={class:`section-title`},Q={class:`section-desc`},$={class:`setting-row`},Gt={class:`setting-label`},Kt={class:`setting-value`},qt={key:0,class:`setting-row`},Jt={class:`setting-label`},Yt={key:1,class:`setting-row`},Xt={class:`setting-label`},Zt={class:`setting-value`},Qt={class:`setting-actions`},$t={class:`section-header`},en={class:`section-title`},tn={class:`section-desc`},nn={class:`notification-groups`},rn={class:`notification-group__header`},an=[`aria-expanded`,`onClick`],on={class:`notification-group__title-wrap`},sn={class:`notification-group__title`},cn={class:`notification-group__desc`},ln={class:`notification-group__actions`},un={key:0,class:`settings-form`},dn={class:`setting-label-group`},fn={class:`setting-label`},pn={class:`setting-hint`},mn={class:`section-header`},hn={class:`section-title`},gn={class:`section-desc`},_n={class:`card-title`},vn={class:`card-desc`},yn={class:`setting-row`},bn={class:`setting-label`},xn={class:`encryption-key-field`},Sn={class:`section-header`},Cn={class:`section-title`},wn={class:`section-desc`},Tn={class:`card-title`},En={class:`card-desc`},Dn={key:0,class:`editor-warning`},On={key:1,class:`setting-row`},kn={class:`setting-label`},An={key:0,class:`editor-option`},jn={class:`editor-option`},Mn={key:2,class:`editor-detected`},Nn={class:`dialog-form__hint`},Pn={class:`section-header`},Fn={class:`section-title`},In={class:`section-desc`},Ln={class:`card-desc`},Rn={key:0,class:`parsers-loading`},zn={key:1,class:`parsers-empty`},Bn={key:2,class:`parsers-list`},Vn={class:`parsers-name`},Hn={key:0,class:`parsers-desc-inline`},Un={class:`parsers-status`},Wn=[`title`],Gn={class:`parsers-actions`},Kn={class:`parsers-footer`},qn={class:`section-header`},Jn={class:`section-title`},Yn={class:`section-desc`},Xn={key:0,class:`parsers-loading`},Zn={key:1,class:`parsers-empty`},Qn={key:2,class:`ai-providers-list`},$n={class:`ai-provider-info`},er={class:`ai-provider-name`},tr={class:`ai-provider-type`},nr={key:0,class:`ai-provider-model`},rr={class:`ai-provider-key`},ir={class:`ai-provider-actions`},ar={key:0,class:`ai-provider-badge`},or={class:`parsers-footer`},sr={class:`section-header`},cr={class:`section-title`},lr={class:`section-desc`},ur={style:{"margin-bottom":`1rem`,display:`flex`,gap:`0.5rem`,"flex-wrap":`wrap`}},dr={style:{margin:`0.25rem 0 0.75rem 0`,opacity:`0.7`}},fr={style:{display:`flex`,"justify-content":`space-between`,"align-items":`center`}},pr={style:{display:`flex`,"align-items":`center`,gap:`0.5rem`}},mr={key:0,style:{"margin-left":`0.5rem`,opacity:`0.6`,"font-size":`0.85rem`}},hr={style:{"font-size":`0.8rem`,opacity:`0.5`,"margin-top":`0.25rem`}},gr={style:{display:`flex`,gap:`0.5rem`}},_r={key:0,style:{"text-align":`center`,opacity:`0.5`,padding:`1rem 2rem 2rem`}},vr={class:`section-header`},yr={class:`section-title`},br={class:`section-desc`},xr={class:`section-header`},Sr={class:`section-title`},Cr={class:`section-desc`},wr={class:`setting-row`},Tr={class:`setting-label`},Er={class:`setting-row`},Dr={class:`setting-label`},Or={class:`setting-value`},kr={class:`dialog-form`},Ar={class:`dialog-form__field`},jr={class:`dialog-form__label`},Mr={class:`dialog-form__field`},Nr={class:`dialog-form__label`},Pr={key:0,class:`ai-provider-info-block`},Fr={class:`ai-provider-info-block__text`},Ir=[`href`],Lr={class:`ai-provider-info-block__models`},Rr={class:`ai-provider-info-block__models-label`},zr={key:1,class:`dialog-form__field`},Br={class:`dialog-form__label`},Vr={class:`dialog-form__field`},Hr={class:`dialog-form__label`},Ur={class:`parser-dialog__layout`},Wr={class:`dialog-form`},Gr={class:`dialog-form__field`},Kr={class:`dialog-form__label`},qr={class:`dialog-form__field`},Jr={class:`dialog-form__label`},Yr={class:`dialog-form__field dialog-form__field--inline`},Xr={class:`dialog-form__label`},Zr={class:`dialog-form__switch`},Qr={class:`dialog-form__switch-label`},$r={class:`dialog-form__field dialog-form__field--code`},ei={class:`dialog-form__label`},ti={class:`dialog-form__templates`},ni={class:`dialog-form__templates-label`},ri={class:`tpl-option`},ii={class:`tpl-option__body`},ai={class:`tpl-option__name`},oi={class:`tpl-option__desc`},si={class:`parser-sim`},ci={class:`parser-sim__header`},li={class:`parser-sim__title`},ui={key:0,class:`parser-sim__status`},di={class:`parser-sim__body`},fi={class:`parser-sim__col`},pi={class:`parser-sim__col-label`},mi={class:`parser-sim__col parser-sim__col--output`},hi={class:`parser-sim__col-label`},gi={key:0,class:`parser-sim__error`},_i={key:1,class:`parser-sim__empty`},vi={class:`parser-ai-prompt`},yi=`
|
|
120
|
+
type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'fatal';
|
|
121
|
+
|
|
122
|
+
interface LogLine {
|
|
123
|
+
/** Raw log line as received from the process (immutable context) */
|
|
124
|
+
readonly raw: string;
|
|
125
|
+
/** Source stream (immutable context) */
|
|
126
|
+
readonly stream: 'stdout' | 'stderr';
|
|
127
|
+
/** Severity level of the log line */
|
|
128
|
+
level: LogLevel;
|
|
129
|
+
/** Parsed/enriched message to display */
|
|
130
|
+
message: string;
|
|
131
|
+
/** When true, the line is hidden from the log view */
|
|
132
|
+
hidden: boolean;
|
|
133
|
+
/** Arbitrary key/value pairs shown in the detail panel */
|
|
134
|
+
metadata: Record<string, unknown>;
|
|
135
|
+
/** Full parsed JSON object when the line is JSON */
|
|
136
|
+
json?: Record<string, unknown>;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Pipeline parser — called for every log line emitted by the process.
|
|
141
|
+
* Each parser receives the LogLine enriched by previous parsers and returns it
|
|
142
|
+
* (potentially modified). Return the line unchanged to pass through.
|
|
143
|
+
*
|
|
144
|
+
* @param line - The LogLine object to enrich
|
|
145
|
+
* @returns The enriched LogLine
|
|
146
|
+
*/
|
|
147
|
+
declare function parser(line: LogLine): LogLine;
|
|
148
|
+
`,bi=`/**
|
|
149
|
+
* Pipeline parser — enrich the LogLine and return it.
|
|
150
|
+
* Return the line unchanged to pass through to the next parser.
|
|
151
|
+
*
|
|
152
|
+
* @param {LogLine} line - The log line object to enrich
|
|
153
|
+
* @returns {LogLine} The enriched log line
|
|
154
|
+
*/
|
|
155
|
+
(line) => {
|
|
156
|
+
if (/ERROR/.test(line.raw)) {
|
|
157
|
+
return { ...line, level: 'error' };
|
|
158
|
+
}
|
|
159
|
+
return line;
|
|
160
|
+
}`,xi=`0.1.0`,Si=`[INFO] Server started on port 3000
|
|
161
|
+
[ERROR] Failed to connect to database: ECONNREFUSED
|
|
162
|
+
[WARN] Memory usage is high: 87%
|
|
163
|
+
{"level":"info","msg":"Request handled","duration":42}`,Ci=i(M({__name:`SettingsPage`,setup(i){let{t:l}=oe(),ue=n(),fe=me(),M=ae(),R=s(),z=ge(),B=D(),V=he(),ve=u(),{scenarios:ye}=ee(ve),be=new Set([`general`,`notifications`,`security`,`editor`,`parsers`,`ai`,`scenario`,`api-keys`,`about`]),xe=fe.query.section??`general`,H=b(be.has(xe)?xe:`general`),Se=[{id:`general`,label:l(`settingsPage.general`),icon:`pi pi-sliders-h`},{id:`notifications`,label:l(`settingsPage.notifications`),icon:`pi pi-bell`},{id:`security`,label:l(`settingsPage.security`),icon:`pi pi-shield`},{id:`editor`,label:l(`settingsPage.codeEditor`),icon:`pi pi-code`},{id:`parsers`,label:l(`settingsPage.navLogParsers`),icon:`pi pi-list`},{id:`ai`,label:l(`settingsPage.navAiProviders`),icon:`pi pi-microchip-ai`},{id:`scenario`,label:l(`settingsPage.navScenario`),icon:`pi pi-building`},{id:`api-keys`,label:l(`nav.apiKeys`),icon:`pi pi-key`},{id:`about`,label:l(`settingsPage.navAbout`),icon:`pi pi-info-circle`}],Ce=b(``),we=b(!1),Te=b(!1);async function Ee(){Te.value=!0;try{Ce.value=(await x.setup.getEncryptionKeyHex.query()).keyHex}catch(e){R.add({severity:`error`,summary:l(`common.error`),detail:A(e)??l(`common.error`),life:4e3})}finally{Te.value=!1}}async function De(){try{await navigator.clipboard.writeText(Ce.value),R.add({severity:`success`,summary:l(`settingsPage.copied`),detail:l(`settingsPage.encryptionKeyCopied`),life:2e3})}catch{R.add({severity:`error`,summary:l(`common.error`),detail:l(`settingsPage.failedToCopy`),life:3e3})}}let Oe=p(()=>V.installedEditors.map(e=>({label:e.name,value:e.key}))),ke=p(()=>V.defaultEditor?.key??null);function Ae(e){e&&V.setDefault(e)}let je=p(()=>[...z.userParsers].sort((e,t)=>e.name.localeCompare(t.name))),Me=b(`local-simple`),Ne=b(``),U=b({name:``,description:``,code:bi,enabled:!0}),W=b(Si),Pe=b([]),G=b(null),Fe=b(!1),Ie=b(0),Le=new Set([`debug`,`info`,`warn`,`error`,`fatal`]),Re=p(()=>Pe.value.map((e,t)=>{let n=e.output??e.input,r=Le.has(n.level)?n.level:`info`;return{id:`${Ie.value}-${t}`,processId:`preview`,timestamp:new Date,level:r,message:e.error?`[parser error] ${e.error}`:n.message,raw:e.input.raw,stream:n.stream===`stderr`?`stderr`:`stdout`,hidden:n.hidden,metadata:e.error?{error:e.error}:n.metadata,json:n.json,logCard:n.logCard}})),ze=null,Be=b(!1),K=b(``),Ve=b(!1),He=b(null),Ue=b(``),We=b(!1),Ge=w();e(Ge.generatedCode,e=>{e&&(U.value.code=e,We.value=!1,Ge.clearResult())});function Ke(){K.value=``,Be.value=!0}function qe(){K.value.trim()&&(Be.value=!1,Ve.value=!0)}function Je(){let e=[];e.push(`Task: ${K.value}`),e.push(`
|
|
164
|
+
## Log parser contract
|
|
165
|
+
|
|
166
|
+
Each parser is an arrow function \`(line: LogLine) => LogLine\` that runs in a pipeline.
|
|
167
|
+
Return the (mutated or spread) line to pass it through, or set \`line.hidden = true\` to hide it.
|
|
168
|
+
|
|
169
|
+
\`\`\`typescript
|
|
170
|
+
interface LogLine {
|
|
171
|
+
readonly raw: string; // original raw text (never modify)
|
|
172
|
+
readonly stream: 'stdout'|'stderr';
|
|
173
|
+
level: 'debug'|'info'|'warn'|'error'|'fatal';
|
|
174
|
+
message: string; // display text
|
|
175
|
+
hidden: boolean; // true = hide from viewer
|
|
176
|
+
metadata: Record<string, unknown>; // extra key/value shown in detail panel
|
|
177
|
+
json?: Record<string, unknown>; // parsed JSON when line is JSON
|
|
178
|
+
}
|
|
179
|
+
\`\`\`
|
|
180
|
+
|
|
181
|
+
## Example
|
|
182
|
+
|
|
183
|
+
Input log line: \`{"level":"error","msg":"DB timeout","latency":320}\`
|
|
184
|
+
|
|
185
|
+
Expected parser:
|
|
186
|
+
\`\`\`javascript
|
|
187
|
+
(line) => {
|
|
188
|
+
if (!line.json) return line;
|
|
189
|
+
return {
|
|
190
|
+
...line,
|
|
191
|
+
level: line.json.level ?? line.level,
|
|
192
|
+
message: line.json.msg ?? line.message,
|
|
193
|
+
metadata: { latency: line.json.latency },
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
\`\`\``),W.value.trim()&&e.push(`## Sample logs to handle\n\`\`\`\n${W.value.trim()}\n\`\`\``);let t=U.value.code.trim();return t&&t!==bi.trim()&&e.push(`## Current parser code (modify if needed)\n\`\`\`javascript\n${t}\n\`\`\``),e.push("## Output\nReply with ONLY the ```javascript code block. No explanation, no prose."),e.join(`
|
|
197
|
+
|
|
198
|
+
`)}function Ye(e,t,n,r){Ve.value=!1;let i=Je();Ue.value=i,He.value?.showScenarioDialog(e,i,t,n??void 0,r)}async function Xe(e,t,n){Ve.value=!1;let r=Je(),i=g(),a=se(),o=await i.createConversation({runner:e===`keep`?void 0:e,providerId:t??void 0});o&&(Ge.setPendingConv(o.id),We.value=!0,a.openPopulate(),await de(),i.send(r,()=>{}))}async function Ze(e,t,n,r,i,a){let o=t||Ue.value,s=g(),ee=await s.createConversation({scenarioId:e,scenarioInput:o,providerId:i});if(!ee)return;let c=n!==`keep`||r.trim()?{...n===`keep`?{}:{runnerOverride:n},...r.trim()?{modelOverride:r.trim()}:{},...a?{agentId:a}:{}}:void 0;Ge.setPendingConv(ee.id),We.value=!0,se().open(),s.startScenarioRun(ee.id,e,o,void 0,c)}async function Qe(){let e=U.value.code.trim();if(!e)return;let t=W.value.split(`
|
|
199
|
+
`).map(e=>e.trim()).filter(Boolean);if(t.length===0){Pe.value=[],G.value=null;return}Fe.value=!0,G.value=null;try{let n=await x.settings.testParser.mutate({code:e,sampleLogs:t.map(e=>({raw:e,stream:`stdout`}))});Ie.value++,Pe.value=n.results}catch(e){G.value=A(e),Pe.value=[]}finally{Fe.value=!1}}function $e(){ze&&clearTimeout(ze),ze=setTimeout(()=>Qe(),400)}e([()=>U.value.code,W],$e);let et=p(()=>U.value.name.trim()&&U.value.code.trim()),tt=b(Object.fromEntries(_e.map(e=>[e.id,!1])));function nt(e){return!!tt.value[e]}function rt(e){tt.value[e]=!tt.value[e]}function it(e){return e.items.every(e=>!!B.preferences[e.key])}function at(e){let t=!it(e),n=Object.create(null);for(let r of e.items)n[r.key]=t;B.updatePreferences(n).catch(e=>{console.error(`[Settings] Failed to bulk update notification preferences`,e),R.add({severity:`error`,summary:l(`common.error`),detail:l(`settingsPage.failedToSavePrefs`),life:3e3})})}function ot(e,t){B.updatePreferences({[e]:t}).catch(e=>{console.error(`[Settings] Failed to update notification preference`,e),R.add({severity:`error`,summary:l(`common.error`),detail:l(`settingsPage.failedToSavePref`),life:3e3})})}te(()=>{Me.value=localStorage.getItem(`runeya-mode`)??`local-simple`,Ne.value=localStorage.getItem(`runeya-cloud-url`)??``,z.fetchParsers(),V.fetchAvailable(),ve.fetchScenarios(),Ee(),bt(),B.loadPreferences().catch(()=>{})});function st(){M.require({header:l(`settingsPage.switchModeConfirmTitle`),message:l(`settingsPage.switchModeConfirmMsg`),icon:`pi pi-exclamation-triangle`,acceptLabel:l(`settingsPage.switchMode`),rejectLabel:l(`actions.cancel`),accept:()=>{localStorage.removeItem(`runeya-setup-complete`),localStorage.removeItem(`runeya-mode`),localStorage.removeItem(`runeya-cloud-url`),ue.push(`/setup`)}})}function ct(){U.value={name:``,description:``,code:bi,enabled:!0},Pe.value=[],G.value=null}function lt(){ct(),z.openCreateDialog()}async function ut(){try{z.editingParser?.id?await z.updateParser({id:z.editingParser.id,...U.value}):await z.createParser(U.value),z.closeDialog(),ct()}catch{}}function dt(e){U.value={name:e.name,description:e.description||``,code:e.code,enabled:e.enabled},z.openEditDialog(e)}function ft(e){M.require({header:l(`settingsPage.deleteParser`),message:`Are you sure you want to delete "${e.name}"?`,icon:`pi pi-exclamation-triangle`,acceptLabel:l(`actions.delete`),rejectLabel:l(`actions.cancel`),accept:async()=>{try{await z.deleteParser(e.id)}catch{}}})}let pt=[{label:`level — Error Extractor`,icon:`pi pi-exclamation-circle`,description:`Override level based on a keyword in the raw line`,code:`/**
|
|
200
|
+
* Overrides the log level based on keywords found in the raw line.
|
|
201
|
+
* Useful when a service always writes to stdout but embeds severity keywords.
|
|
202
|
+
*
|
|
203
|
+
* @param {LogLine} line
|
|
204
|
+
* @returns {LogLine}
|
|
205
|
+
*/
|
|
206
|
+
(line) => {
|
|
207
|
+
if (/ERROR|FATAL/i.test(line.raw)) {
|
|
208
|
+
return { ...line, level: "error" };
|
|
209
|
+
}
|
|
210
|
+
if (/WARN/i.test(line.raw)) {
|
|
211
|
+
return { ...line, level: "warn" };
|
|
212
|
+
}
|
|
213
|
+
return line;
|
|
214
|
+
}`,sampleLogs:`[INFO] Server started on port 3000
|
|
215
|
+
[WARN] Memory usage is high: 87%
|
|
216
|
+
[ERROR] Failed to connect to database: ECONNREFUSED
|
|
217
|
+
[FATAL] Out of memory — process exiting
|
|
218
|
+
[INFO] Health check passed`},{label:`message — Rewrite from raw`,icon:`pi pi-pencil`,description:`Extract a cleaner message from the raw line`,code:`/**
|
|
219
|
+
* Strips the log prefix (e.g. "[INFO] ") and sets it as the display message.
|
|
220
|
+
* Leaves raw intact for searching while showing a cleaner line in the viewer.
|
|
221
|
+
*
|
|
222
|
+
* @param {LogLine} line
|
|
223
|
+
* @returns {LogLine}
|
|
224
|
+
*/
|
|
225
|
+
(line) => {
|
|
226
|
+
const match = line.raw.match(/^\\[\\w+\\]\\s+(.+)$/);
|
|
227
|
+
if (match) {
|
|
228
|
+
return { ...line, message: match[1] };
|
|
229
|
+
}
|
|
230
|
+
return line;
|
|
231
|
+
}`,sampleLogs:`[INFO] Server started on port 3000
|
|
232
|
+
[ERROR] Failed to connect to database
|
|
233
|
+
[WARN] Disk space below 10%
|
|
234
|
+
[DEBUG] Cache miss for key user:42`},{label:`metadata — Enrich from raw`,icon:`pi pi-tag`,description:`Parse fields from the raw line into metadata`,code:`/**
|
|
235
|
+
* Extracts structured fields from a raw log line and exposes them as metadata.
|
|
236
|
+
* Metadata is shown in the detail panel when expanding a log line.
|
|
237
|
+
*
|
|
238
|
+
* @param {LogLine} line
|
|
239
|
+
* @returns {LogLine}
|
|
240
|
+
*/
|
|
241
|
+
(line) => {
|
|
242
|
+
const match = line.raw.match(
|
|
243
|
+
/^(?<method>GET|POST|PUT|DELETE|PATCH)\\s+(?<path>\\S+)\\s+(?<status>\\d+)\\s+(?<duration>\\d+)ms/
|
|
244
|
+
);
|
|
245
|
+
if (match?.groups) {
|
|
246
|
+
const { method, path, status, duration } = match.groups;
|
|
247
|
+
return {
|
|
248
|
+
...line,
|
|
249
|
+
metadata: {
|
|
250
|
+
...line.metadata,
|
|
251
|
+
method,
|
|
252
|
+
path,
|
|
253
|
+
status: Number(status),
|
|
254
|
+
duration_ms: Number(duration),
|
|
255
|
+
},
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
return line;
|
|
259
|
+
}`,sampleLogs:`GET /api/users 200 42ms
|
|
260
|
+
POST /api/login 200 118ms
|
|
261
|
+
GET /api/orders 404 8ms
|
|
262
|
+
DELETE /api/session 204 5ms
|
|
263
|
+
GET /api/health 500 301ms`},{label:`json — Parse structured logs`,icon:`pi pi-code`,description:`Parse JSON lines and promote fields to level / message / metadata`,code:`/**
|
|
264
|
+
* Handles JSON-formatted log lines (e.g. from pino, winston structured output).
|
|
265
|
+
* Promotes standard fields (level, msg/message) and keeps the rest as metadata.
|
|
266
|
+
*
|
|
267
|
+
* @param {LogLine} line
|
|
268
|
+
* @returns {LogLine}
|
|
269
|
+
*/
|
|
270
|
+
(line) => {
|
|
271
|
+
try {
|
|
272
|
+
const parsed = JSON.parse(line.raw);
|
|
273
|
+
const level = parsed.level ?? parsed.severity ?? line.level;
|
|
274
|
+
const message = parsed.msg ?? parsed.message ?? line.message;
|
|
275
|
+
const { level: _l, severity: _s, msg: _m, message: _msg, ...rest } = parsed;
|
|
276
|
+
return {
|
|
277
|
+
...line,
|
|
278
|
+
level,
|
|
279
|
+
message,
|
|
280
|
+
json: parsed,
|
|
281
|
+
metadata: { ...line.metadata, ...rest },
|
|
282
|
+
};
|
|
283
|
+
} catch {
|
|
284
|
+
return line;
|
|
285
|
+
}
|
|
286
|
+
}`,sampleLogs:`{"level":"info","msg":"Server started","port":3000}
|
|
287
|
+
{"level":"warn","msg":"High memory","usage":87,"unit":"%"}
|
|
288
|
+
{"level":"error","msg":"DB connection failed","host":"db:5432","attempt":3}
|
|
289
|
+
{"severity":"debug","message":"Cache miss","key":"user:42","ttl":300}
|
|
290
|
+
Not a JSON line — should pass through unchanged`},{label:`hidden — Filter noise`,icon:`pi pi-eye-slash`,description:`Hide lines matching a pattern from the log viewer`,code:`/**
|
|
291
|
+
* Sets hidden: true on lines that are pure noise (health checks, keep-alives…).
|
|
292
|
+
* Hidden lines are not rendered in the viewer but remain available in raw.
|
|
293
|
+
*
|
|
294
|
+
* @param {LogLine} line
|
|
295
|
+
* @returns {LogLine}
|
|
296
|
+
*/
|
|
297
|
+
(line) => {
|
|
298
|
+
const isNoise =
|
|
299
|
+
/GET \\/health/.test(line.raw) ||
|
|
300
|
+
/GET \\/ping/.test(line.raw) ||
|
|
301
|
+
/keep-alive/i.test(line.raw);
|
|
302
|
+
|
|
303
|
+
if (isNoise) {
|
|
304
|
+
return { ...line, hidden: true };
|
|
305
|
+
}
|
|
306
|
+
return line;
|
|
307
|
+
}`,sampleLogs:`GET /health 200 2ms
|
|
308
|
+
GET /api/users 200 34ms
|
|
309
|
+
GET /ping 200 1ms
|
|
310
|
+
POST /api/login 200 88ms
|
|
311
|
+
GET /health 200 1ms
|
|
312
|
+
keep-alive probe ok`},{label:`stream — stderr to error`,icon:`pi pi-arrow-right-arrow-left`,description:`Promote lines from stderr to error level automatically`,code:`/**
|
|
313
|
+
* Any line arriving on stderr is likely an error even if unlabelled.
|
|
314
|
+
* This parser forces level: "error" for all stderr lines that weren't
|
|
315
|
+
* already classified.
|
|
316
|
+
*
|
|
317
|
+
* @param {LogLine} line
|
|
318
|
+
* @returns {LogLine}
|
|
319
|
+
*/
|
|
320
|
+
(line) => {
|
|
321
|
+
if (line.stream === "stderr" && line.level === "info") {
|
|
322
|
+
return { ...line, level: "error" };
|
|
323
|
+
}
|
|
324
|
+
return line;
|
|
325
|
+
}`,sampleLogs:`Unhandled promise rejection: TypeError: Cannot read properties of null
|
|
326
|
+
Error: ENOENT: no such file or directory, open '/tmp/app.pid'
|
|
327
|
+
Warning: possible EventEmitter memory leak detected`},{label:`Winston — default format`,icon:`pi pi-server`,description:`Parse Winston's default "level: message" text output`,code:`/**
|
|
328
|
+
* Parses Winston's default text format:
|
|
329
|
+
* 2024-01-15T10:23:45.123Z [info]: Server started {"port":3000}
|
|
330
|
+
*
|
|
331
|
+
* Extracts timestamp, level, message and any trailing JSON as metadata.
|
|
332
|
+
*
|
|
333
|
+
* @param {LogLine} line
|
|
334
|
+
* @returns {LogLine}
|
|
335
|
+
*/
|
|
336
|
+
(line) => {
|
|
337
|
+
const match = line.raw.match(
|
|
338
|
+
/^(?<ts>\\S+)\\s+\\[(?<level>\\w+)\\]:\\s+(?<msg>.+?)(?:\\s+(?<json>\\{.*\\}))?$/
|
|
339
|
+
);
|
|
340
|
+
if (!match?.groups) return line;
|
|
341
|
+
|
|
342
|
+
const { level, msg, json } = match.groups;
|
|
343
|
+
let extra = {};
|
|
344
|
+
try { extra = json ? JSON.parse(json) : {}; } catch {}
|
|
345
|
+
|
|
346
|
+
return {
|
|
347
|
+
...line,
|
|
348
|
+
level: level.toLowerCase(),
|
|
349
|
+
message: msg,
|
|
350
|
+
metadata: { ...line.metadata, ...extra },
|
|
351
|
+
};
|
|
352
|
+
}`,sampleLogs:`2024-01-15T10:23:45.123Z [info]: Server started {"port":3000}
|
|
353
|
+
2024-01-15T10:23:46.001Z [warn]: High memory usage {"used":87,"unit":"%"}
|
|
354
|
+
2024-01-15T10:23:47.554Z [error]: DB connection failed {"host":"db:5432","code":"ECONNREFUSED"}
|
|
355
|
+
2024-01-15T10:23:48.200Z [debug]: Cache miss {"key":"user:42"}
|
|
356
|
+
2024-01-15T10:23:49.000Z [info]: Request handled`},{label:`Pino — JSON logger`,icon:`pi pi-server`,description:`Parse Pino's JSON output with numeric level codes`,code:`/**
|
|
357
|
+
* Parses Pino's JSON log format.
|
|
358
|
+
* Pino uses numeric levels: 10=trace, 20=debug, 30=info, 40=warn, 50=error, 60=fatal
|
|
359
|
+
*
|
|
360
|
+
* @param {LogLine} line
|
|
361
|
+
* @returns {LogLine}
|
|
362
|
+
*/
|
|
363
|
+
(line) => {
|
|
364
|
+
try {
|
|
365
|
+
const parsed = JSON.parse(line.raw);
|
|
366
|
+
if (parsed.level === undefined) return line;
|
|
367
|
+
|
|
368
|
+
const PINO_LEVELS = { 10: "debug", 20: "debug", 30: "info", 40: "warn", 50: "error", 60: "error" };
|
|
369
|
+
const level = typeof parsed.level === "number"
|
|
370
|
+
? (PINO_LEVELS[parsed.level] ?? "info")
|
|
371
|
+
: parsed.level;
|
|
372
|
+
|
|
373
|
+
const message = parsed.msg ?? parsed.message ?? line.message;
|
|
374
|
+
const { level: _l, msg: _m, message: _mm, time: _t, pid: _p, hostname: _h, ...rest } = parsed;
|
|
375
|
+
|
|
376
|
+
return {
|
|
377
|
+
...line,
|
|
378
|
+
level,
|
|
379
|
+
message,
|
|
380
|
+
json: parsed,
|
|
381
|
+
metadata: { ...line.metadata, ...rest },
|
|
382
|
+
};
|
|
383
|
+
} catch {
|
|
384
|
+
return line;
|
|
385
|
+
}
|
|
386
|
+
}`,sampleLogs:`{"level":30,"time":1705314225123,"pid":1337,"hostname":"api-1","msg":"Server listening","port":3000}
|
|
387
|
+
{"level":40,"time":1705314226001,"pid":1337,"hostname":"api-1","msg":"Memory pressure","used":87}
|
|
388
|
+
{"level":50,"time":1705314227554,"pid":1337,"hostname":"api-1","msg":"Unhandled error","err":{"message":"ECONNREFUSED"}}
|
|
389
|
+
{"level":20,"time":1705314228200,"pid":1337,"hostname":"api-1","msg":"Cache miss","key":"user:42"}
|
|
390
|
+
{"level":60,"time":1705314229000,"pid":1337,"hostname":"api-1","msg":"Fatal: out of memory"}`},{label:`Morgan — HTTP access log`,icon:`pi pi-globe`,description:`Parse Morgan's "combined" / "common" Apache-style access log`,code:`/**
|
|
391
|
+
* Parses Morgan combined/common format:
|
|
392
|
+
* ::1 - - [15/Jan/2024:10:23:45 +0000] "GET /api/users HTTP/1.1" 200 512 42
|
|
393
|
+
*
|
|
394
|
+
* Extracts method, path, status, bytes and response time as metadata.
|
|
395
|
+
* Sets level to "error" for 5xx, "warn" for 4xx.
|
|
396
|
+
*
|
|
397
|
+
* @param {LogLine} line
|
|
398
|
+
* @returns {LogLine}
|
|
399
|
+
*/
|
|
400
|
+
(line) => {
|
|
401
|
+
const match = line.raw.match(
|
|
402
|
+
/(?<ip>\\S+)\\s+\\S+\\s+\\S+\\s+\\[(?<date>[^\\]]+)\\]\\s+"(?<method>\\w+)\\s+(?<path>\\S+)\\s+\\S+"\\s+(?<status>\\d+)\\s+(?<bytes>\\d+|-)/
|
|
403
|
+
);
|
|
404
|
+
if (!match?.groups) return line;
|
|
405
|
+
|
|
406
|
+
const { ip, method, path, status, bytes } = match.groups;
|
|
407
|
+
const statusNum = Number(status);
|
|
408
|
+
const level = statusNum >= 500 ? "error" : statusNum >= 400 ? "warn" : "info";
|
|
409
|
+
|
|
410
|
+
return {
|
|
411
|
+
...line,
|
|
412
|
+
level,
|
|
413
|
+
message: \`\${method} \${path} \${status}\`,
|
|
414
|
+
metadata: {
|
|
415
|
+
...line.metadata,
|
|
416
|
+
ip,
|
|
417
|
+
method,
|
|
418
|
+
path,
|
|
419
|
+
status: statusNum,
|
|
420
|
+
bytes: bytes === "-" ? 0 : Number(bytes),
|
|
421
|
+
},
|
|
422
|
+
};
|
|
423
|
+
}`,sampleLogs:`::1 - - [15/Jan/2024:10:23:45 +0000] "GET /api/users HTTP/1.1" 200 512
|
|
424
|
+
::1 - alice [15/Jan/2024:10:23:46 +0000] "POST /api/login HTTP/1.1" 200 128
|
|
425
|
+
::1 - - [15/Jan/2024:10:23:47 +0000] "GET /api/secret HTTP/1.1" 401 64
|
|
426
|
+
::1 - - [15/Jan/2024:10:23:48 +0000] "GET /api/missing HTTP/1.1" 404 32
|
|
427
|
+
::1 - - [15/Jan/2024:10:23:49 +0000] "POST /api/crash HTTP/1.1" 500 256`},{label:`Nginx — error log`,icon:`pi pi-globe`,description:`Parse Nginx error log format`,code:`/**
|
|
428
|
+
* Parses Nginx error log format:
|
|
429
|
+
* 2024/01/15 10:23:45 [error] 1337#0: *1 connect() failed (111: Connection refused)
|
|
430
|
+
*
|
|
431
|
+
* @param {LogLine} line
|
|
432
|
+
* @returns {LogLine}
|
|
433
|
+
*/
|
|
434
|
+
(line) => {
|
|
435
|
+
const match = line.raw.match(
|
|
436
|
+
/^(?<date>\\d{4}\\/\\d{2}\\/\\d{2}\\s+\\d{2}:\\d{2}:\\d{2})\\s+\\[(?<level>\\w+)\\]\\s+(?<pid>\\d+#\\d+):\\s+(?<msg>.+)$/
|
|
437
|
+
);
|
|
438
|
+
if (!match?.groups) return line;
|
|
439
|
+
|
|
440
|
+
const { level, pid, msg } = match.groups;
|
|
441
|
+
const NGINX_LEVELS = { emerg: "error", alert: "error", crit: "error", error: "error", warn: "warn", notice: "info", info: "info", debug: "debug" };
|
|
442
|
+
|
|
443
|
+
return {
|
|
444
|
+
...line,
|
|
445
|
+
level: NGINX_LEVELS[level] ?? "info",
|
|
446
|
+
message: msg,
|
|
447
|
+
metadata: { ...line.metadata, pid },
|
|
448
|
+
};
|
|
449
|
+
}`,sampleLogs:`2024/01/15 10:23:45 [notice] 1#1: nginx/1.25.3 started
|
|
450
|
+
2024/01/15 10:23:46 [error] 1337#0: *1 connect() failed (111: Connection refused) while connecting to upstream
|
|
451
|
+
2024/01/15 10:23:47 [warn] 1337#0: *2 upstream response time 3.012, request: "GET /api/slow HTTP/1.1"
|
|
452
|
+
2024/01/15 10:23:48 [error] 1337#0: *3 open() "/var/www/missing.html" failed (2: No such file or directory)
|
|
453
|
+
2024/01/15 10:23:49 [info] 1337#0: *4 client connected from 192.168.1.1`},{label:`Docker — container logs`,icon:`pi pi-box`,description:`Strip Docker timestamp prefix and detect level from content`,code:`/**
|
|
454
|
+
* Strips Docker's log timestamp prefix added by "docker logs --timestamps":
|
|
455
|
+
* 2024-01-15T10:23:45.123456789Z <actual log line>
|
|
456
|
+
*
|
|
457
|
+
* Then does a best-effort level detection on the remaining content.
|
|
458
|
+
*
|
|
459
|
+
* @param {LogLine} line
|
|
460
|
+
* @returns {LogLine}
|
|
461
|
+
*/
|
|
462
|
+
(line) => {
|
|
463
|
+
const match = line.raw.match(/^(?<ts>\\d{4}-\\d{2}-\\d{2}T[\\d:.]+Z)\\s+(?<rest>.+)$/);
|
|
464
|
+
const content = match?.groups?.rest ?? line.raw;
|
|
465
|
+
const ts = match?.groups?.ts;
|
|
466
|
+
|
|
467
|
+
const levelMatch = content.match(/\\b(DEBUG|INFO|WARN(?:ING)?|ERROR|FATAL|CRITICAL)\\b/i);
|
|
468
|
+
const level = levelMatch
|
|
469
|
+
? levelMatch[1].toLowerCase().replace("warning", "warn").replace("critical", "error").replace("fatal", "error")
|
|
470
|
+
: line.level;
|
|
471
|
+
|
|
472
|
+
return {
|
|
473
|
+
...line,
|
|
474
|
+
level,
|
|
475
|
+
message: content,
|
|
476
|
+
metadata: ts ? { ...line.metadata, docker_ts: ts } : line.metadata,
|
|
477
|
+
};
|
|
478
|
+
}`,sampleLogs:`2024-01-15T10:23:45.123456789Z [INFO] Server started on port 3000
|
|
479
|
+
2024-01-15T10:23:46.001000000Z [WARN] Memory usage is high: 87%
|
|
480
|
+
2024-01-15T10:23:47.554321000Z [ERROR] Failed to connect to redis
|
|
481
|
+
2024-01-15T10:23:48.200000000Z CRITICAL: disk full at /var/lib/docker
|
|
482
|
+
2024-01-15T10:23:49.000000000Z DEBUG: heartbeat ok`},{label:`Log4j / Log4net — classic Java format`,icon:`pi pi-server`,description:`Parse Log4j PatternLayout output`,code:`/**
|
|
483
|
+
* Parses Log4j / Log4net default PatternLayout:
|
|
484
|
+
* 2024-01-15 10:23:45,123 ERROR com.example.App - Something went wrong
|
|
485
|
+
*
|
|
486
|
+
* @param {LogLine} line
|
|
487
|
+
* @returns {LogLine}
|
|
488
|
+
*/
|
|
489
|
+
(line) => {
|
|
490
|
+
const match = line.raw.match(
|
|
491
|
+
/^(?<ts>\\d{4}-\\d{2}-\\d{2}\\s+\\d{2}:\\d{2}:\\d{2}[.,]\\d+)\\s+(?<level>\\w+)\\s+(?<logger>\\S+)\\s+-\\s+(?<msg>.+)$/
|
|
492
|
+
);
|
|
493
|
+
if (!match?.groups) return line;
|
|
494
|
+
|
|
495
|
+
const { level, logger, msg } = match.groups;
|
|
496
|
+
const LEVELS = { TRACE: "debug", DEBUG: "debug", INFO: "info", WARN: "warn", ERROR: "error", FATAL: "error" };
|
|
497
|
+
|
|
498
|
+
return {
|
|
499
|
+
...line,
|
|
500
|
+
level: LEVELS[level.toUpperCase()] ?? "info",
|
|
501
|
+
message: msg,
|
|
502
|
+
metadata: { ...line.metadata, logger },
|
|
503
|
+
};
|
|
504
|
+
}`,sampleLogs:`2024-01-15 10:23:45,123 INFO com.example.App - Application started
|
|
505
|
+
2024-01-15 10:23:46,001 DEBUG com.example.db.Pool - Acquired connection from pool
|
|
506
|
+
2024-01-15 10:23:47,554 WARN com.example.cache.Redis - Cache miss rate above threshold: 42%
|
|
507
|
+
2024-01-15 10:23:48,200 ERROR com.example.http.Client - Request failed after 3 retries
|
|
508
|
+
2024-01-15 10:23:49,000 FATAL com.example.App - Unrecoverable error, shutting down`}],mt=b(null);function ht(e){U.value.code=e.code,W.value=e.sampleLogs,mt.value=null}let gt=[{label:`Anthropic (Claude)`,value:`anthropic`},{label:`OpenAI (ChatGPT)`,value:`openai`},{label:`Mistral AI`,value:`mistral`},{label:`Groq`,value:`groq`},{label:`Ollama (local)`,value:`ollama`}],_t=p(()=>({anthropic:{description:l(`settingsAiProviders.anthropicDesc`),url:`https://console.anthropic.com/settings/keys`,urlLabel:`console.anthropic.com → API Keys`,keyRequired:!0,defaultModels:[`claude-opus-4-6`,`claude-sonnet-4-6`,`claude-haiku-4-5`]},openai:{description:l(`settingsAiProviders.openaiDesc`),url:`https://platform.openai.com/api-keys`,urlLabel:`platform.openai.com → API keys`,keyRequired:!0,defaultModels:[`gpt-4o`,`gpt-4o-mini`,`o3-mini`,`o1`]},mistral:{description:l(`settingsAiProviders.mistralDesc`),url:`https://console.mistral.ai/api-keys/`,urlLabel:`console.mistral.ai → API Keys`,keyRequired:!0,defaultModels:[`mistral-large-latest`,`mistral-medium-latest`,`codestral-latest`]},groq:{description:l(`settingsAiProviders.groqDesc`),url:`https://console.groq.com/keys`,urlLabel:`console.groq.com → API Keys`,keyRequired:!0,defaultModels:[`llama-3.3-70b-versatile`,`llama-3.1-8b-instant`,`mixtral-8x7b-32768`]},ollama:{description:l(`settingsAiProviders.ollamaDesc`),url:`https://ollama.com/download`,urlLabel:l(`settingsAiProviders.ollamaUrlLabel`),keyRequired:!1,defaultModels:[`llama3.2`,`mistral`,`phi3`,`gemma3`]}})),q=p(()=>_t.value[Z.value.provider]),vt=b([]),J=b(!1),Y=b(!1),X=b(null),Z=b({name:``,provider:`anthropic`,apiKey:``,model:``}),yt=p(()=>Z.value.name.trim()&&(Z.value.provider===`ollama`||Z.value.apiKey.trim()||X.value!==null));async function bt(){J.value=!0;try{vt.value=await x.settings.listAIProviders.query()}catch(e){R.add({severity:`error`,summary:l(`common.error`),detail:A(e)??l(`common.error`),life:4e3})}finally{J.value=!1}}function xt(){X.value=null,Z.value={name:``,provider:`anthropic`,apiKey:``,model:``},Y.value=!0}function St(e){X.value=e.id,Z.value={name:e.name,provider:e.provider,apiKey:``,model:e.model??``},Y.value=!0}async function Ct(){J.value=!0;try{X.value?(await x.settings.updateAIProvider.mutate({id:X.value,name:Z.value.name,provider:Z.value.provider,...Z.value.apiKey?{apiKey:Z.value.apiKey}:{},model:Z.value.model||void 0}),R.add({severity:`success`,summary:l(`settingsPage.updated`),detail:l(`settingsPage.aiProviderUpdated`),life:2e3})):(await x.settings.createAIProvider.mutate({name:Z.value.name,provider:Z.value.provider,apiKey:Z.value.apiKey,model:Z.value.model||void 0}),R.add({severity:`success`,summary:l(`settingsPage.created`),detail:l(`settingsPage.aiProviderAdded`),life:2e3})),Y.value=!1,await bt()}catch(e){R.add({severity:`error`,summary:l(`common.error`),detail:A(e)??l(`common.error`),life:4e3})}finally{J.value=!1}}async function wt(e){try{await x.settings.setActiveAIProvider.mutate({id:e}),await bt(),R.add({severity:`success`,summary:l(`settingsPage.activeProviderSet`),detail:l(`settingsPage.activeProviderSetDesc`),life:2500})}catch(e){R.add({severity:`error`,summary:l(`common.error`),detail:A(e)??l(`common.error`),life:4e3})}}function Tt(e){M.require({header:l(`settingsPage.deleteParser`),message:`Are you sure you want to delete "${e.name}"?`,icon:`pi pi-exclamation-triangle`,acceptLabel:l(`actions.delete`),rejectLabel:l(`actions.cancel`),accept:async()=>{try{await x.settings.deleteAIProvider.mutate({id:e.id}),await bt(),R.add({severity:`success`,summary:l(`settingsPage.deleted`),detail:l(`settingsPage.aiProviderRemoved`),life:2e3})}catch(e){R.add({severity:`error`,summary:l(`common.error`),detail:A(e)??l(`common.error`),life:4e3})}}})}return e(H,e=>{ue.replace({name:`settings`,query:{section:e}})}),(e,n)=>(t(),v(`div`,It,[T(`div`,Lt,[T(`nav`,Rt,[T(`div`,zt,C(r(l)(`settingsPage.title`)),1),T(`ul`,Bt,[(t(),v(f,null,c(Se,e=>T(`li`,{key:e.id,class:o([`settings-nav__item`,{"settings-nav__item--active":H.value===e.id}]),onClick:t=>H.value=e.id},[T(`i`,{class:o([e.icon,`settings-nav__icon`])},null,2),T(`span`,null,C(e.label),1)],10,Vt)),64))])]),T(`main`,Ht,[H.value===`general`?(t(),v(f,{key:0},[T(`div`,Ut,[T(`h2`,Wt,C(r(l)(`settingsPage.general`)),1),T(`p`,Q,C(r(l)(`settingsPage.generalDesc`)),1)]),d(r(F),{class:`settings-card`},{title:k(()=>[y(C(r(l)(`settingsPage.operatingMode`)),1)]),content:k(()=>[T(`div`,$,[T(`label`,Gt,C(r(l)(`settingsPage.currentMode`)),1),T(`div`,Kt,[T(`i`,{class:o(Me.value===`cloud`?`pi pi-cloud`:`pi pi-desktop`)},null,2),T(`span`,null,C(Me.value===`cloud`?r(l)(`settingsPage.cloud`):r(l)(`settingsPage.localSimple`)),1)])]),Me.value===`cloud`?(t(),v(`div`,qt,[T(`label`,Jt,C(r(l)(`settingsPage.cloudUrl`)),1),d(r(O),{"model-value":Ne.value,disabled:``,class:`setting-input`},null,8,[`model-value`])])):h(``,!0),Me.value===`cloud`?(t(),v(`div`,Yt,[T(`label`,Xt,C(r(l)(`settingsPage.syncStatus`)),1),T(`div`,Zt,[d(r(I),{severity:`info`,closable:!1},{default:k(()=>[y(C(r(l)(`settingsPage.syncStatusNotImplemented`)),1)]),_:1})])])):h(``,!0),T(`div`,Qt,[d(r(a),{label:r(l)(`settingsPage.switchMode`),icon:`pi pi-refresh`,severity:`warning`,outlined:``,onClick:st},null,8,[`label`])])]),_:1})],64)):H.value===`notifications`?(t(),v(f,{key:1},[T(`div`,$t,[T(`h2`,en,C(r(l)(`settingsPage.notifications`)),1),T(`p`,tn,C(r(l)(`settingsPage.notificationsDesc`)),1)]),d(r(F),{class:`settings-card`},{content:k(()=>[T(`div`,nn,[(t(!0),v(f,null,c(r(_e),e=>(t(),v(`section`,{key:e.id,class:`notification-group`},[T(`header`,rn,[T(`button`,{type:`button`,class:`notification-group__collapse-button`,"aria-expanded":!nt(e.id),onClick:t=>rt(e.id)},[T(`div`,on,[T(`i`,{class:o([e.icon,`notification-group__icon`])},null,2),T(`h3`,sn,C(e.title),1),T(`i`,{class:o([`pi notification-group__chevron`,nt(e.id)?`pi-chevron-right`:`pi-chevron-down`])},null,2)]),T(`p`,cn,C(e.desc),1)],8,an),T(`div`,ln,[d(r(a),{size:`small`,severity:`secondary`,text:``,disabled:r(B).preferencesLoading,label:it(e)?r(l)(`settingsPage.disableAll`):r(l)(`settingsPage.enableAll`),onClick:pe(t=>at(e),[`stop`])},null,8,[`disabled`,`label`,`onClick`])])]),nt(e.id)?h(``,!0):(t(),v(`div`,un,[(t(!0),v(f,null,c(e.items,e=>(t(),v(`div`,{key:e.key,class:`setting-row setting-row--toggle`},[T(`div`,dn,[T(`label`,fn,C(e.label),1),T(`small`,pn,C(e.desc),1)]),d(r(P),{"model-value":r(B).preferences[e.key],disabled:r(B).preferencesLoading,"onUpdate:modelValue":t=>ot(e.key,!!t)},null,8,[`model-value`,`disabled`,`onUpdate:modelValue`])]))),128))]))]))),128))])]),_:1})],64)):H.value===`security`?(t(),v(f,{key:2},[T(`div`,mn,[T(`h2`,hn,C(r(l)(`settingsPage.security`)),1),T(`p`,gn,C(r(l)(`settingsPage.securityDesc`)),1)]),d(r(F),{class:`settings-card`},{title:k(()=>[T(`div`,_n,[n[22]||=T(`i`,{class:`pi pi-key`},null,-1),T(`span`,null,C(r(l)(`settingsPage.encryptionKey`)),1)])]),content:k(()=>[T(`p`,vn,C(r(l)(`settingsPage.encryptionKeyDesc`)),1),T(`div`,yn,[T(`label`,bn,C(r(l)(`settingsPage.keyHex`)),1),T(`div`,xn,[d(r(O),{"model-value":Ce.value,type:we.value?`text`:`password`,readonly:``,class:`setting-input encryption-key-input`,loading:Te.value},null,8,[`model-value`,`type`,`loading`]),d(r(a),{icon:we.value?`pi pi-eye-slash`:`pi pi-eye`,text:``,rounded:``,severity:`secondary`,title:we.value?r(l)(`settingsPage.hideKey`):r(l)(`settingsPage.showKey`),onClick:n[0]||=e=>we.value=!we.value},null,8,[`icon`,`title`]),d(r(a),{icon:`pi pi-copy`,text:``,rounded:``,severity:`secondary`,title:r(l)(`settingsPage.copyToClipboard`),disabled:!Ce.value,onClick:De},null,8,[`title`,`disabled`])])])]),_:1})],64)):H.value===`editor`?(t(),v(f,{key:3},[T(`div`,Sn,[T(`h2`,Cn,C(r(l)(`settingsPage.codeEditor`)),1),T(`p`,wn,C(r(l)(`settingsPage.codeEditorDesc`)),1)]),d(r(F),{class:`settings-card`},{title:k(()=>[T(`div`,Tn,[d(N,{"editor-key":ke.value,size:16},null,8,[`editor-key`]),T(`span`,null,C(r(l)(`settingsPage.preferredEditor`)),1)])]),content:k(()=>[T(`p`,En,C(r(l)(`settingsPage.preferredEditorHint`)),1),r(V).installedEditors.length===0&&r(V).availableEditors.length>0?(t(),v(`div`,Dn,[d(r(I),{severity:`warn`,closable:!1},{default:k(()=>[y(C(r(l)(`settingsPage.noEditorsDetected`)),1)]),_:1})])):(t(),v(`div`,On,[T(`label`,kn,C(r(l)(`settingsPage.defaultEditor`)),1),d(r(ie),{"model-value":ke.value,options:Oe.value,"option-label":`label`,"option-value":`value`,placeholder:r(l)(`settingsPage.selectEditor`),class:`setting-input`,"onUpdate:modelValue":Ae},{value:k(e=>[e.value?(t(),v(`div`,An,[d(N,{"editor-key":e.value,size:16},null,8,[`editor-key`]),T(`span`,null,C(Oe.value.find(t=>t.value===e.value)?.label),1)])):h(``,!0)]),option:k(e=>[T(`div`,jn,[d(N,{"editor-key":e.option.value,size:16},null,8,[`editor-key`]),T(`span`,null,C(e.option.label),1)])]),_:1},8,[`model-value`,`options`,`placeholder`])])),r(V).installedEditors.length>0?(t(),v(`div`,Mn,[T(`small`,Nn,C(r(l)(`settingsPage.detectedEditors`))+`: `+C(r(V).installedEditors.map(e=>e.name).join(`, `)),1)])):h(``,!0)]),_:1})],64)):H.value===`parsers`?(t(),v(f,{key:4},[T(`div`,Pn,[T(`h2`,Fn,C(r(l)(`settingsPage.logParsersTitle`)),1),T(`p`,In,C(r(l)(`settingsPage.logParsersDesc`)),1)]),d(r(F),{class:`settings-card`},{content:k(()=>[T(`p`,Ln,C(r(l)(`settingsPage.logParsersCardDesc`)),1),r(z).loading?(t(),v(`div`,Rn,[n[23]||=T(`i`,{class:`pi pi-spin pi-spinner`},null,-1),T(`span`,null,C(r(l)(`settingsPage.loadingParsers`)),1)])):je.value.length===0?(t(),v(`div`,zn,C(r(l)(`settingsPage.noParsers`)),1)):(t(),v(`div`,Bn,[(t(!0),v(f,null,c(je.value,e=>(t(),v(`div`,{key:e.id,class:`parsers-row`},[T(`span`,Vn,C(e.name),1),e.description?(t(),v(`span`,Hn,C(e.description),1)):h(``,!0),T(`div`,Un,[T(`i`,{class:o(e.enabled?`pi pi-check parsers-icon--on`:`pi pi-times parsers-icon--off`),title:e.enabled?r(l)(`common.enabled`):r(l)(`common.disabled`)},null,10,Wn)]),T(`div`,Gn,[d(r(a),{icon:`pi pi-pencil`,severity:`info`,text:``,rounded:``,size:`small`,onClick:t=>dt(e)},null,8,[`onClick`]),d(r(a),{icon:`pi pi-trash`,severity:`danger`,text:``,rounded:``,size:`small`,onClick:t=>ft(e)},null,8,[`onClick`])])]))),128))])),T(`div`,Kn,[d(r(a),{label:r(l)(`settingsPage.newParser`),icon:`pi pi-plus`,severity:`secondary`,outlined:``,size:`small`,onClick:lt},null,8,[`label`])])]),_:1})],64)):H.value===`ai`?(t(),v(f,{key:5},[T(`div`,qn,[T(`h2`,Jn,C(r(l)(`settingsPage.navAiProviders`)),1),T(`p`,Yn,C(r(l)(`settingsPage.aiProvidersDesc`)),1)]),d(r(F),{class:`settings-card`},{content:k(()=>[J.value&&vt.value.length===0?(t(),v(`div`,Xn,[n[24]||=T(`i`,{class:`pi pi-spin pi-spinner`},null,-1),T(`span`,null,C(r(l)(`actions.loading`)),1)])):vt.value.length===0?(t(),v(`div`,Zn,C(r(l)(`settingsPage.noAiProviders`)),1)):(t(),v(`div`,Qn,[(t(!0),v(f,null,c(vt.value,e=>(t(),v(`div`,{key:e.id,class:o([`ai-provider-row`,{"ai-provider-row--active":e.active}])},[T(`div`,$n,[T(`span`,er,C(e.name),1),T(`span`,tr,C(gt.find(t=>t.value===e.provider)?.label??e.provider),1),e.model?(t(),v(`span`,nr,C(e.model),1)):h(``,!0),T(`code`,rr,C(e.maskedKey),1)]),T(`div`,ir,[e.active?(t(),v(`span`,ar,[n[25]||=T(`i`,{class:`pi pi-check-circle`},null,-1),y(` `+C(r(l)(`common.active`)),1)])):(t(),j(r(a),{key:1,label:r(l)(`settingsPage.setActive`),icon:`pi pi-check`,severity:`secondary`,outlined:``,size:`small`,onClick:t=>wt(e.id)},null,8,[`label`,`onClick`])),d(r(a),{icon:`pi pi-pencil`,severity:`info`,text:``,rounded:``,size:`small`,onClick:t=>St(e)},null,8,[`onClick`]),d(r(a),{icon:`pi pi-trash`,severity:`danger`,text:``,rounded:``,size:`small`,onClick:t=>Tt(e)},null,8,[`onClick`])])],2))),128))])),T(`div`,or,[d(r(a),{label:r(l)(`settingsPage.addProvider`),icon:`pi pi-plus`,severity:`secondary`,outlined:``,size:`small`,onClick:xt},null,8,[`label`])])]),_:1})],64)):H.value===`scenario`?(t(),v(f,{key:6},[T(`div`,sr,[T(`h2`,cr,C(r(l)(`settingsPage.navScenario`)),1),T(`p`,lr,C(r(l)(`settingsPage.scenarioDesc`)),1)]),T(`div`,ur,[d(r(a),{icon:`pi pi-plus`,label:r(l)(`settingsPage.newScenario`),onClick:n[1]||=e=>r(ue).push({name:`scenario-new`})},null,8,[`label`])]),T(`h3`,dr,C(r(l)(`settingsPage.navScenario`)),1),(t(!0),v(f,null,c(r(ye),e=>(t(),j(r(F),{key:e.id,class:`settings-card`,style:{"margin-bottom":`0.75rem`}},{content:k(()=>[T(`div`,fr,[T(`div`,pr,[T(`i`,{class:o(`pi ${e.icon||`pi-building`}`),style:{"font-size":`1.1rem`,opacity:`0.7`}},null,2),T(`div`,null,[T(`strong`,null,C(e.name),1),e.description?(t(),v(`span`,mr,C(e.description),1)):h(``,!0),T(`div`,hr,C(r(l)(`settingsPage.scenarioNodes`,{count:e.nodes.length}))+` · `+C(r(l)(`settingsPage.scenarioGroups`,{count:e.groups.length})),1)])]),T(`div`,gr,[d(r(a),{icon:`pi pi-pencil`,text:``,rounded:``,size:`small`,onClick:t=>r(ue).push({name:`scenario-edit`,params:{id:e.id}})},null,8,[`onClick`]),d(r(a),{icon:`pi pi-copy`,text:``,rounded:``,size:`small`,severity:`secondary`,onClick:t=>r(ve).duplicateScenario(e.id)},null,8,[`onClick`]),d(r(a),{icon:`pi pi-trash`,text:``,rounded:``,size:`small`,severity:`danger`,onClick:t=>r(ve).deleteScenario(e.id)},null,8,[`onClick`])])])]),_:2},1024))),128)),r(ye).length===0?(t(),v(`div`,_r,C(r(l)(`settingsPage.noScenarios`)),1)):h(``,!0)],64)):H.value===`api-keys`?(t(),v(f,{key:7},[T(`div`,vr,[T(`h2`,yr,C(r(l)(`nav.apiKeys`)),1),T(`p`,br,C(r(l)(`apiKeysPage.desc`)),1)]),d(Ft)],64)):H.value===`about`?(t(),v(f,{key:8},[T(`div`,xr,[T(`h2`,Sr,C(r(l)(`settingsPage.navAbout`)),1),T(`p`,Cr,C(r(l)(`settingsPage.aboutDesc`)),1)]),d(r(F),{class:`settings-card`},{title:k(()=>[y(C(r(l)(`settingsPage.applicationTitle`)),1)]),content:k(()=>[T(`div`,wr,[T(`label`,Tr,C(r(l)(`settingsPage.versionLabel`)),1),T(`div`,{class:`setting-value`},[T(`span`,null,C(xi))])]),T(`div`,Er,[T(`label`,Dr,C(r(l)(`settingsPage.runtimeLabel`)),1),T(`div`,Or,[T(`span`,null,C(r(l)(`settingsPage.runtimeValue`)),1)])])]),_:1})],64)):h(``,!0)])]),d(r(ne),{visible:Y.value,"onUpdate:visible":n[7]||=e=>Y.value=e,header:X.value?r(l)(`settingsPage.editAiProvider`):r(l)(`settingsPage.addAiProvider`),modal:!0,style:{width:`36rem`}},{footer:k(()=>[d(r(a),{label:r(l)(`actions.cancel`),severity:`secondary`,outlined:``,onClick:n[6]||=e=>Y.value=!1},null,8,[`label`]),d(r(a),{label:r(l)(`actions.save`),icon:`pi pi-check`,disabled:!yt.value||J.value,loading:J.value,onClick:Ct},null,8,[`label`,`disabled`,`loading`])]),default:k(()=>[T(`div`,kr,[T(`div`,Ar,[T(`label`,jr,[n[26]||=T(`i`,{class:`pi pi-tag`},null,-1),T(`span`,null,C(r(l)(`common.name`)),1)]),d(r(O),{modelValue:Z.value.name,"onUpdate:modelValue":n[2]||=e=>Z.value.name=e,placeholder:r(l)(`settingsPage.aiProviderNamePlaceholder`),class:`dialog-form__input`},null,8,[`modelValue`,`placeholder`])]),T(`div`,Mr,[T(`label`,Nr,[n[27]||=T(`i`,{class:`pi pi-microchip-ai`},null,-1),T(`span`,null,C(r(l)(`settingsPage.providerLabel`)),1)]),d(r(ie),{modelValue:Z.value.provider,"onUpdate:modelValue":n[3]||=e=>Z.value.provider=e,options:gt,"option-label":`label`,"option-value":`value`,class:`dialog-form__input`},null,8,[`modelValue`])]),q.value?(t(),v(`div`,Pr,[T(`p`,Fr,C(q.value.description),1),q.value.url?(t(),v(`a`,{key:0,href:q.value.url,target:`_blank`,rel:`noopener noreferrer`,class:`ai-provider-info-block__link`},[n[28]||=T(`i`,{class:`pi pi-external-link`},null,-1),y(` `+C(q.value.urlLabel),1)],8,Ir)):h(``,!0),T(`div`,Lr,[T(`span`,Rr,C(r(l)(`settingsPage.commonModels`)),1),(t(!0),v(f,null,c(q.value.defaultModels,e=>(t(),v(`code`,{key:e,class:`ai-provider-info-block__model-tag`},C(e),1))),128))])])):h(``,!0),q.value?.keyRequired?(t(),v(`div`,zr,[T(`label`,Br,[n[29]||=T(`i`,{class:`pi pi-key`},null,-1),T(`span`,null,C(r(l)(`settingsPage.apiKeyLabel`))+C(X.value?` (${r(l)(`settingsPage.apiKeyLeaveEmpty`)})`:``),1)]),d(r(O),{modelValue:Z.value.apiKey,"onUpdate:modelValue":n[4]||=e=>Z.value.apiKey=e,type:`password`,placeholder:X.value?r(l)(`settingsPage.apiKeyKeepPlaceholder`):`sk-...`,class:`dialog-form__input`},null,8,[`modelValue`,`placeholder`])])):h(``,!0),T(`div`,Vr,[T(`label`,Hr,[n[30]||=T(`i`,{class:`pi pi-cog`},null,-1),T(`span`,null,[y(C(r(l)(`settingsPage.modelOverride`))+` `,1),T(`small`,null,`(`+C(r(l)(`common.optional`))+`)`,1)])]),d(r(O),{modelValue:Z.value.model,"onUpdate:modelValue":n[5]||=e=>Z.value.model=e,placeholder:`${r(l)(`settingsPage.modelOverridePlaceholder`,{model:q.value?.defaultModels[0]??`model-name`})}`,class:`dialog-form__input`},null,8,[`modelValue`,`placeholder`])])])]),_:1},8,[`visible`,`header`]),d(r(ne),{visible:r(z).createDialogOpen,"onUpdate:visible":n[17]||=e=>r(z).createDialogOpen=e,header:r(z).editingParser?r(l)(`settingsPage.editParser`):r(l)(`settingsPage.newParser`),modal:!0,style:{width:`calc(100vw - 20px)`,height:`calc(100vh - 20px)`}},{footer:k(()=>[d(r(a),{label:r(l)(`actions.cancel`),severity:`secondary`,outlined:``,onClick:n[15]||=e=>r(z).closeDialog()},null,8,[`label`]),d(r(a),{label:r(l)(`actions.save`),icon:`pi pi-check`,disabled:!et.value||r(z).loading,loading:r(z).loading,onClick:n[16]||=e=>ut()},null,8,[`label`,`disabled`,`loading`])]),default:k(()=>[T(`div`,Ur,[T(`div`,Wr,[T(`div`,Gr,[T(`label`,Kr,[n[31]||=T(`i`,{class:`pi pi-tag`},null,-1),T(`span`,null,C(r(l)(`common.name`)),1)]),d(r(O),{modelValue:U.value.name,"onUpdate:modelValue":n[8]||=e=>U.value.name=e,placeholder:`e.g., ErrorExtractor`,class:`dialog-form__input`},null,8,[`modelValue`])]),T(`div`,qr,[T(`label`,Jr,[n[32]||=T(`i`,{class:`pi pi-info-circle`},null,-1),T(`span`,null,C(r(l)(`common.description`)),1)]),d(r(O),{modelValue:U.value.description,"onUpdate:modelValue":n[9]||=e=>U.value.description=e,placeholder:r(l)(`settingsPage.optionalDesc`),class:`dialog-form__input`},null,8,[`modelValue`,`placeholder`])]),T(`div`,Yr,[T(`label`,Xr,[n[33]||=T(`i`,{class:`pi pi-power-off`},null,-1),T(`span`,null,C(r(l)(`settingsPage.enabledLabel`)),1)]),T(`div`,Zr,[d(r(P),{modelValue:U.value.enabled,"onUpdate:modelValue":n[10]||=e=>U.value.enabled=e},null,8,[`modelValue`]),T(`span`,Qr,C(U.value.enabled?r(l)(`common.active`):r(l)(`common.inactive`)),1)])]),T(`div`,$r,[T(`label`,ei,[n[34]||=T(`i`,{class:`pi pi-code`},null,-1),T(`span`,null,C(r(l)(`settingsPage.codeLabel`)),1),d(r(a),{icon:`pi pi-microchip-ai`,size:`small`,severity:`secondary`,text:``,loading:We.value,class:`dialog-form__ai-btn`,onClick:Ke},null,8,[`loading`])]),n[35]||=T(`small`,{class:`dialog-form__hint`},[T(`code`,null,`(line: LogLine) => LogLine`),y(` — enrich and return the line; return unchanged to pass through `)],-1),d(_,{modelValue:U.value.code,"onUpdate:modelValue":n[11]||=e=>U.value.code=e,language:`javascript`,height:`100%`,"extra-lib":yi},null,8,[`modelValue`])]),T(`div`,ti,[T(`span`,ni,C(r(l)(`settingsPage.quickTemplates`)),1),d(r(ie),{modelValue:mt.value,"onUpdate:modelValue":n[12]||=e=>mt.value=e,options:pt,"option-label":`label`,placeholder:`Choose a template…`,filter:``,"filter-placeholder":`Search templates…`,class:`dialog-form__templates-select`,onChange:n[13]||=e=>mt.value&&ht(mt.value)},{option:k(({option:e})=>[T(`div`,ri,[T(`i`,{class:o([e.icon,`tpl-option__icon`])},null,2),T(`span`,ii,[T(`span`,ai,C(e.label),1),T(`span`,oi,C(e.description),1)])])]),_:1},8,[`modelValue`])])]),T(`div`,si,[T(`div`,ci,[T(`span`,li,[n[36]||=T(`i`,{class:`pi pi-play-circle`},null,-1),y(` `+C(r(l)(`settingsPage.liveSimulation`)),1)]),Fe.value?(t(),v(`span`,ui,[n[37]||=T(`i`,{class:`pi pi-spin pi-spinner`},null,-1),y(` `+C(r(l)(`settingsPage.simRunning`)),1)])):h(``,!0)]),T(`div`,di,[T(`div`,fi,[T(`div`,pi,C(r(l)(`settingsPage.sampleLogs`)),1),le(T(`textarea`,{"onUpdate:modelValue":n[14]||=e=>W.value=e,class:`parser-sim__textarea`,rows:`8`,placeholder:`Paste sample log lines here…`},null,512),[[ce,W.value]])]),T(`div`,mi,[T(`div`,hi,C(r(l)(`settingsPage.simOutput`)),1),G.value?(t(),v(`div`,gi,[n[38]||=T(`i`,{class:`pi pi-exclamation-circle`},null,-1),y(` `+C(G.value),1)])):Re.value.length===0&&!Fe.value?(t(),v(`div`,_i,C(r(l)(`settingsPage.simEmpty`)),1)):(t(),j(L,{key:2,logs:Re.value,loading:Fe.value,class:`parser-sim__viewer`},null,8,[`logs`,`loading`]))])])])])]),_:1},8,[`visible`,`header`]),d(r(ne),{visible:Be.value,"onUpdate:visible":n[20]||=e=>Be.value=e,header:`Generate parser with AI`,modal:!0,style:{width:`500px`}},{footer:k(()=>[d(r(a),{label:`Cancel`,severity:`secondary`,outlined:``,onClick:n[19]||=e=>Be.value=!1}),d(r(a),{label:`Next`,icon:`pi pi-arrow-right`,"icon-pos":`right`,disabled:!K.value.trim(),onClick:qe},null,8,[`disabled`])]),default:k(()=>[T(`div`,vi,[n[39]||=T(`p`,{class:`parser-ai-prompt__desc`},` Describe what your log parser should do. The AI will generate the JavaScript function for you. `,-1),d(r(S),{modelValue:K.value,"onUpdate:modelValue":n[18]||=e=>K.value=e,rows:`4`,placeholder:`e.g. Parse JSON logs and extract the level and message fields. Set level to error if the status code is >= 500.`,class:`parser-ai-prompt__input`,"auto-resize":``,onKeydown:E(pe(qe,[`ctrl`]),[`enter`])},null,8,[`modelValue`,`onKeydown`])])]),_:1},8,[`visible`]),d(r(ne),{visible:Ve.value,"onUpdate:visible":n[21]||=e=>Ve.value=e,header:`Choose AI runner`,modal:!0,style:{width:`700px`,maxHeight:`80vh`},pt:{content:{style:`overflow-y:auto`}}},{default:k(()=>[d(re,{compact:``,onSelectScenario:Ye,onSkip:Xe})]),_:1},8,[`visible`]),d(m,{ref_key:`parserAiModalsRef`,ref:He,onConfirmScenarioStart:Ze},null,512)]))}}),[[`__scopeId`,`data-v-e0281c30`]]);export{Ci as default};
|