@lobu/runtime-server 24.0.0 → 24.1.1
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/component.json +1 -1
- package/dist/connectors/x-dm-adapter.js +65 -30
- package/dist/db/migrations/20261021010000_views_compile_config_hash.sql +16 -0
- package/dist/dependencies.bun.lock +1 -1
- package/dist/owletto/dist/assets/{_-CC8cTmRg.js → _-BorucF19.js} +3 -3
- package/dist/owletto/dist/assets/_-CkGyNi0G.js +2 -0
- package/dist/owletto/dist/assets/_agentId-BrhcaxUk.js +2 -0
- package/dist/owletto/dist/assets/{_agentId-DWUFSrVp.js → _agentId-DgRrCE2B.js} +2 -2
- package/dist/owletto/dist/assets/{_automationId-BnHqdXOC.js → _automationId-DSrZIYcs.js} +2 -2
- package/dist/owletto/dist/assets/{_connectorKey._connectionId-CefXIqy2.js → _connectorKey._connectionId-DWxv1uoi.js} +2 -2
- package/dist/owletto/dist/assets/{_connectorKey.index-C1QPGf9E.js → _connectorKey.index-BTP5ijdT.js} +2 -2
- package/dist/owletto/dist/assets/{_conversationId-DinuPCUp.js → _conversationId-98Y3RuRO.js} +2 -2
- package/dist/owletto/dist/assets/{_deploymentId-BeyzVjRm.js → _deploymentId-B1UWPY0i.js} +2 -2
- package/dist/owletto/dist/assets/{_eventId-3L_qeL_l.js → _eventId-BAnr8g8z.js} +2 -2
- package/dist/owletto/dist/assets/_name-BUfFO_A0.js +2 -0
- package/dist/owletto/dist/assets/{_owner-DbrKma4e.js → _owner-C79BwQ0I.js} +3 -3
- package/dist/owletto/dist/assets/_shape-Ep6JpyFX.js +2 -0
- package/dist/owletto/dist/assets/_skillKey-B24alBfT.js +2 -0
- package/dist/owletto/dist/assets/{_slug-ndDr_CUg.js → _slug-DbPdDc-5.js} +2 -2
- package/dist/owletto/dist/assets/_viewKey-DDUxjjFD.js +2 -0
- package/dist/owletto/dist/assets/_viewKey-hdpq3RoX.js +2 -0
- package/dist/owletto/dist/assets/{accept-invitation-CRKbM2Xy.js → accept-invitation-UXU5Fx2G.js} +2 -2
- package/dist/owletto/dist/assets/{activity-route-view-CFLNukhD.js → activity-route-view-D7ORHntE.js} +2 -2
- package/dist/owletto/dist/assets/{agent-card-controls-Be1Okb2C.js → agent-card-controls-CplnPhbv.js} +2 -2
- package/dist/owletto/dist/assets/{agent-client-setup-list-BA8dU_C6.js → agent-client-setup-list-BlXB4SE5.js} +2 -2
- package/dist/owletto/dist/assets/{agent-connect-pages-CAV-yXus.js → agent-connect-pages-BmknviTI.js} +2 -2
- package/dist/owletto/dist/assets/{agent-editor-form-Bi6WvYX-.js → agent-editor-form-DsSoeQeF.js} +2 -2
- package/dist/owletto/dist/assets/{agent-guardrails-route-DMOjG1D4.js → agent-guardrails-route-TdvvIc_J.js} +2 -2
- package/dist/owletto/dist/assets/{agent-loading-shells-De_2d8Lr.js → agent-loading-shells-B7v6Cffw.js} +2 -2
- package/dist/owletto/dist/assets/{agent-permissions-matrix-gZWl6mAe.js → agent-permissions-matrix-BkZu1LYE.js} +2 -2
- package/dist/owletto/dist/assets/{agent-skill-context-JLaTamGR.js → agent-skill-context-DFucg4c4.js} +2 -2
- package/dist/owletto/dist/assets/{agent-skills-route-DcK41PWj.js → agent-skills-route-B3vvvZZe.js} +2 -2
- package/dist/owletto/dist/assets/{agent-subpage-shell-BBJoyTuC.js → agent-subpage-shell-CZJvnjNC.js} +2 -2
- package/dist/owletto/dist/assets/agent-thread-D38STyeu.js +6 -0
- package/dist/owletto/dist/assets/agents-DAOln24A.js +2 -0
- package/dist/owletto/dist/assets/{agents-workbench-CqaKGggb.js → agents-workbench-DJ67GZ93.js} +2 -2
- package/dist/owletto/dist/assets/{app._appId-Cl1fTuIt.js → app._appId-Cp78oEZ9.js} +2 -2
- package/dist/owletto/dist/assets/{automation-detail-content-BMLL4lxO.js → automation-detail-content-DSwbRpbx.js} +2 -2
- package/dist/owletto/dist/assets/automations-DAOln24A.js +2 -0
- package/dist/owletto/dist/assets/{callback-DTKKsfkz.js → callback-CBexCo3F.js} +2 -2
- package/dist/owletto/dist/assets/{card-yU0TmNRH.js → card-jzhQrMDP.js} +2 -2
- package/dist/owletto/dist/assets/{claim-DJfTvlT2.js → claim-B-wq745Q.js} +2 -2
- package/dist/owletto/dist/assets/{client-rows--FrZfJol.js → client-rows-BYbsXGy9.js} +2 -2
- package/dist/owletto/dist/assets/{clients-L4K1UT8c.js → clients-BhNl1tVq.js} +2 -2
- package/dist/owletto/dist/assets/{code-editor-U54Gwjit.js → code-editor-CEqoCky-.js} +2 -2
- package/dist/owletto/dist/assets/connect-wx-qqLir.js +2 -0
- package/dist/owletto/dist/assets/connect._clientId-kk0_4Svo.js +2 -0
- package/dist/owletto/dist/assets/connected._clientId-QR8o-7M5.js +2 -0
- package/dist/owletto/dist/assets/{connected._clientId.activity-DTpSW1Xy.js → connected._clientId.activity-BqprYeOX.js} +2 -2
- package/dist/owletto/dist/assets/{connected._clientId.index-h9X5H1x8.js → connected._clientId.index-DhRoSzBr.js} +2 -2
- package/dist/owletto/dist/assets/{connection-ByvKkyFm.js → connection-CNm2ukrI.js} +2 -2
- package/dist/owletto/dist/assets/{connection-feed-detail-DWM9lTao.js → connection-feed-detail-WcGCA6qY.js} +2 -2
- package/dist/owletto/dist/assets/{connections-browser-CEwYrYqt.js → connections-browser-CrtnAs0Q.js} +2 -2
- package/dist/owletto/dist/assets/{connector-provenance-BocTm__v.js → connector-provenance-D-ECOlMJ.js} +2 -2
- package/dist/owletto/dist/assets/{connector-scope-lists-OYDOydtz.js → connector-scope-lists-CRFEpSvk.js} +2 -2
- package/dist/owletto/dist/assets/{connectors-CyZpcE5f.js → connectors-CH4KBZyT.js} +2 -2
- package/dist/owletto/dist/assets/{consent-DdfINrVp.js → consent-C9ZpHb7V.js} +2 -2
- package/dist/owletto/dist/assets/{conversations-table-BSznfdYt.js → conversations-table-D_HOe1jN.js} +2 -2
- package/dist/owletto/dist/assets/{core.esm-Dr7tcIB-.js → core.esm-BupT3V0i.js} +2 -2
- package/dist/owletto/dist/assets/create-C4lptGWj.js +2 -0
- package/dist/owletto/dist/assets/{create-CBGwASon.js → create-CCjZxIkK.js} +2 -2
- package/dist/owletto/dist/assets/create-DkgUQAbB.js +2 -0
- package/dist/owletto/dist/assets/{create-automation-form-9T5WnoUs.js → create-automation-form-Bpy92SM5.js} +2 -2
- package/dist/owletto/dist/assets/create._connectorKey-D6Kc-YQ3.js +2 -0
- package/dist/owletto/dist/assets/{cronstrue-BWFEyy_P.js → cronstrue-CWImw-kf.js} +2 -2
- package/dist/owletto/dist/assets/{deployments-wG_8QzOF.js → deployments-C5hvipQh.js} +2 -2
- package/dist/owletto/dist/assets/deployments-CPpFAd_w.js +2 -0
- package/dist/owletto/dist/assets/{deployments-body-2xKS8gRo.js → deployments-body-DGII20dQ.js} +2 -2
- package/dist/owletto/dist/assets/{device-6z-xgsoW.js → device-D-7WBe9E.js} +2 -2
- package/dist/owletto/dist/assets/{device-pin-tombstone-Cwq88RMU.js → device-pin-tombstone-2U0UMu3_.js} +2 -2
- package/dist/owletto/dist/assets/{device._deviceId-BDerBfD9.js → device._deviceId-Bn37UpWH.js} +2 -2
- package/dist/owletto/dist/assets/{entity-avatar-Cc1CuI-0.js → entity-avatar-mdh7Kq5D.js} +2 -2
- package/dist/owletto/dist/assets/{entity-options-DHdMC1Lx.js → entity-options-Clz_WXK-.js} +2 -2
- package/dist/owletto/dist/assets/{entity-page--OkXmlNP.js → entity-page-D3e4iPle.js} +2 -2
- package/dist/owletto/dist/assets/{entity-type-page-89RoK_-P.js → entity-type-page-DebN1vCM.js} +2 -2
- package/dist/owletto/dist/assets/{event-detail-D4YZRtrA.js → event-detail-DV_zfWnC.js} +2 -2
- package/dist/owletto/dist/assets/events-feed-DO3IiJO2.js +2 -0
- package/dist/owletto/dist/assets/{filter-editors-B1_QUpg_.js → filter-editors-Bwhqj7lY.js} +2 -2
- package/dist/owletto/dist/assets/{full-page-spinner-Cqih-8IW.js → full-page-spinner-BVbcpW3R.js} +2 -2
- package/dist/owletto/dist/assets/guardrails-BiJollCA.js +2 -0
- package/dist/owletto/dist/assets/identity-HCFWtdaI.js +2 -0
- package/dist/owletto/dist/assets/index-8wxsyxqt.js +2 -0
- package/dist/owletto/dist/assets/{index-DYCqXaMf.js → index-9YuSRymd.js} +4 -4
- package/dist/owletto/dist/assets/index-B3c-0eZG.js +2 -0
- package/dist/owletto/dist/assets/{index-TgRS2v_F.js → index-B64PGxQm.js} +2 -2
- package/dist/owletto/dist/assets/{index-DfyDUpuI.js → index-BTlx9K_t.js} +2 -2
- package/dist/owletto/dist/assets/index-BX0EA_oB.js +2 -0
- package/dist/owletto/dist/assets/index-CdJJaQDX.js +2 -0
- package/dist/owletto/dist/assets/index-CfT_W8Vo.js +2 -0
- package/dist/owletto/dist/assets/{index-DYzWV5_z.js → index-CxF2XXzl.js} +2 -2
- package/dist/owletto/dist/assets/index-D3WHeGql.js +2 -0
- package/dist/owletto/dist/assets/{index-ZNlrDc_f.js → index-D7gHOpfg.js} +2 -2
- package/dist/owletto/dist/assets/{index-DKPwCasf.js → index-DB1iWI_a.js} +2 -2
- package/dist/owletto/dist/assets/index-DMNzF8Lf.js +2 -0
- package/dist/owletto/dist/assets/index-DyB3IzOA.js +2 -0
- package/dist/owletto/dist/assets/{index-DAOyXG1X.js → index-fgAJydgX.js} +2 -2
- package/dist/owletto/dist/assets/{json-diff-DFvYINBT.js → json-diff-DIN5Jhfx.js} +2 -2
- package/dist/owletto/dist/assets/{list-skeleton-DFsEqLU1.js → list-skeleton-CepswBka.js} +2 -2
- package/dist/owletto/dist/assets/{login-DO0j-AYr.js → login-DxGYyE4n.js} +2 -2
- package/dist/owletto/dist/assets/{logout-BmNwoAf7.js → logout-Bkzc7J44.js} +2 -2
- package/dist/owletto/dist/assets/{member-scope-gate-B2LrMWBU.js → member-scope-gate-DD4YBFn-.js} +2 -2
- package/dist/owletto/dist/assets/{memory-browse-page-Cjpl8EbB.js → memory-browse-page-D_UlBa27.js} +2 -2
- package/dist/owletto/dist/assets/{model-selector-TQcA93xm.js → model-selector-CDrAjH31.js} +2 -2
- package/dist/owletto/dist/assets/models-BAVeysNq.js +2 -0
- package/dist/owletto/dist/assets/{new-BMrFy5Qa.js → new-C2av0diq.js} +2 -2
- package/dist/owletto/dist/assets/{new-ByBhteWA.js → new-ktz9Cs_P.js} +2 -2
- package/dist/owletto/dist/assets/{new-DWp3deoW.js → new-snm1ctHn.js} +2 -2
- package/dist/owletto/dist/assets/{oauth-workspace-access-D_5uESuz.js → oauth-workspace-access-lZNZ9gul.js} +2 -2
- package/dist/owletto/dist/assets/{organization-DTFoYP4V.js → organization-Cb0W823y.js} +2 -2
- package/dist/owletto/dist/assets/{peek-pane-content-DF5iGC3c.js → peek-pane-content-BNR9ImQY.js} +2 -2
- package/dist/owletto/dist/assets/{permissions-C_auqxfP.js → permissions-Dv39zWKt.js} +2 -2
- package/dist/owletto/dist/assets/{proposal-review-shell-DsNiavG_.js → proposal-review-shell-CFhOqCLf.js} +2 -2
- package/dist/owletto/dist/assets/public-shell-ready-DqX8AXfw.js +2 -0
- package/dist/owletto/dist/assets/{recent-3d99S2IE.js → recent-QhnLDU1_.js} +2 -2
- package/dist/owletto/dist/assets/{record-activity-C9KfBkXb.js → record-activity-ZJntBfN_.js} +2 -2
- package/dist/owletto/dist/assets/{record-field-peek-BBZcRuGT.js → record-field-peek-Brh1IQGy.js} +2 -2
- package/dist/owletto/dist/assets/{record-session-BizRugWs.js → record-session-Pbr5czGw.js} +2 -2
- package/dist/owletto/dist/assets/{reset-password-DqfcSn8M.js → reset-password-CzZw6RcC.js} +2 -2
- package/dist/owletto/dist/assets/{runs-panel-T1ZxTVz6.js → runs-panel-C0_DNTcq.js} +2 -2
- package/dist/owletto/dist/assets/{runs-table-D_8QlCCN.js → runs-table-B1APZv7d.js} +2 -2
- package/dist/owletto/dist/assets/{schema-value-normalization-CylKX3PK.js → schema-value-normalization-CKdPjdPC.js} +2 -2
- package/dist/owletto/dist/assets/settings-CgZ5Z7wD.js +2 -0
- package/dist/owletto/dist/assets/{settings-B_ClYztB.js → settings-VDNiffKU.js} +2 -2
- package/dist/owletto/dist/assets/skills-DgDGscm5.js +2 -0
- package/dist/owletto/dist/assets/{source-record-panels-Cg249m1S.js → source-record-panels-BdfOVPWn.js} +2 -2
- package/dist/owletto/dist/assets/{use-mention-search-BYbFvHbJ.js → use-mention-search-Dcunv4L0.js} +2 -2
- package/dist/owletto/dist/assets/{view-param-filters-DMSqkN2J.js → view-param-filters-B0quibBi.js} +2 -2
- package/dist/owletto/dist/index.html +1 -1
- package/dist/server-main.bundle.mjs +455 -201
- package/npm-shrinkwrap.json +8 -8
- package/package.json +1 -1
- package/vendor/connector-sdk/package.json +1 -1
- package/vendor/core/dist/contracts/tools/view-runtime.d.ts +74 -0
- package/vendor/core/dist/contracts/tools/view-runtime.js +86 -0
- package/vendor/core/package.json +6 -1
- package/vendor/views/package.json +1 -1
- package/dist/owletto/dist/assets/_-ksFp4zVf.js +0 -2
- package/dist/owletto/dist/assets/_agentId-MENLoohA.js +0 -2
- package/dist/owletto/dist/assets/_name-Dgedji78.js +0 -2
- package/dist/owletto/dist/assets/_shape-DtVfRFz_.js +0 -2
- package/dist/owletto/dist/assets/_skillKey-CqLHzm7L.js +0 -2
- package/dist/owletto/dist/assets/_viewKey-3CH5w8mr.js +0 -2
- package/dist/owletto/dist/assets/_viewKey-DHQY9A8u.js +0 -2
- package/dist/owletto/dist/assets/agent-thread-Buz3naVF.js +0 -6
- package/dist/owletto/dist/assets/agents-C-ReckCa.js +0 -2
- package/dist/owletto/dist/assets/automations-C-ReckCa.js +0 -2
- package/dist/owletto/dist/assets/connect-4zqtnDHb.js +0 -2
- package/dist/owletto/dist/assets/connect._clientId-Dj0SqgbE.js +0 -2
- package/dist/owletto/dist/assets/connected._clientId-sgtocSvf.js +0 -2
- package/dist/owletto/dist/assets/create-Cf5hp6Z8.js +0 -2
- package/dist/owletto/dist/assets/create-CwThQtd3.js +0 -2
- package/dist/owletto/dist/assets/create._connectorKey-sNHQHNpg.js +0 -2
- package/dist/owletto/dist/assets/deployments-DHh9dyzv.js +0 -2
- package/dist/owletto/dist/assets/events-feed-DsrkV2ix.js +0 -2
- package/dist/owletto/dist/assets/guardrails-B8Rs1be3.js +0 -2
- package/dist/owletto/dist/assets/identity-B0nH4yiC.js +0 -2
- package/dist/owletto/dist/assets/index-4TSkcsth.js +0 -2
- package/dist/owletto/dist/assets/index-BgkhXElB.js +0 -2
- package/dist/owletto/dist/assets/index-CoW4Bz3w.js +0 -2
- package/dist/owletto/dist/assets/index-Codw-Qqi.js +0 -2
- package/dist/owletto/dist/assets/index-DMyXd3bJ.js +0 -2
- package/dist/owletto/dist/assets/index-DYYZLcJ0.js +0 -2
- package/dist/owletto/dist/assets/index-Da6CrGEu.js +0 -2
- package/dist/owletto/dist/assets/index-DneshLbf.js +0 -2
- package/dist/owletto/dist/assets/models-D7aED5Sa.js +0 -2
- package/dist/owletto/dist/assets/public-shell-ready-B2NUI89V.js +0 -2
- package/dist/owletto/dist/assets/settings-DgX1-xo7.js +0 -2
- package/dist/owletto/dist/assets/skills-Drw5tcZw.js +0 -2
package/dist/owletto/dist/assets/{_conversationId-DinuPCUp.js → _conversationId-98Y3RuRO.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as e,eo as M,Q as h,j0 as j,r as w,bh as z,d7 as C,j1 as b}from"./index-
|
|
2
|
-
//# sourceMappingURL=_conversationId-
|
|
1
|
+
import{j as e,eo as M,Q as h,j0 as j,r as w,bh as z,d7 as C,j1 as b}from"./index-9YuSRymd.js";import{A as k}from"./agent-loading-shells-B7v6Cffw.js";import{s as N,R as y,A as L}from"./agent-thread-D38STyeu.js";import"./app-bridge-BCm4muqj.js";import"./use-mention-search-Dcunv4L0.js";import"./index-Vcq4gwWv.js";import"./events-feed-DO3IiJO2.js";import"./conversations-table-D_HOe1jN.js";import"./clients-BhNl1tVq.js";import"./schema-value-normalization-CKdPjdPC.js";import"./card-jzhQrMDP.js";const m={path:"M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z",hex:"5865F2"},p={path:"M1.637 0C.733 0 0 .733 0 1.637v16.5c0 .904.733 1.636 1.637 1.636h3.955v3.323c0 .804.97 1.207 1.539.638l3.963-3.96h11.27c.903 0 1.636-.733 1.636-1.637V5.592L18.408 0Zm3.955 5.592h12.816v8.59H8.455l-2.863 2.863Z",hex:"34A853"},d={path:"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z",hex:"26A5E4"},x={path:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z",hex:"25D366"},O={discord:{hex:`#${m.hex}`,path:m.path},gchat:{hex:`#${p.hex}`,path:p.path},slack:{hex:"#4A154B",path:"M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z"},teams:{imgSrc:"https://www.google.com/s2/favicons?domain=teams.microsoft.com&sz=64"},telegram:{hex:`#${d.hex}`,path:d.path},whatsapp:{hex:`#${x.hex}`,path:x.path}};function T({platform:s,className:t}){const a=s?O[s]:null;return a?"imgSrc"in a?e.jsx("img",{src:a.imgSrc,alt:"","aria-hidden":"true",className:h("rounded-sm",t),loading:"lazy"}):e.jsx("svg",{viewBox:a.viewBox??"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:t,style:{color:a.hex},children:e.jsx("path",{d:a.path})}):e.jsx(M,{className:h("text-muted-foreground",t),"aria-hidden":"true"})}const I={slack:"Slack",telegram:"Telegram",whatsapp:"WhatsApp",discord:"Discord",web:"Web"};function R(s,t,a){return s==="slack"&&a?.teamId&&t?`https://app.slack.com/client/${a.teamId}/${t}`:null}function S({owner:s,agentId:t,conversationId:a}){const{data:n=[],isLoading:u}=j(t,a,{orgSlug:s}),c=w.useMemo(()=>n.map(r=>N(r,{showToolCalls:!0})).filter(r=>r!==null),[n]),[o,g]=a.split(":"),i=I[o]??"the source app",{org:f}=z(),{data:v=[]}=C(f?.id??"",{connectorKey:o}),A=v[0]?.config?.chatMetadata,l=R(o,g,A);return e.jsx("div",{className:"mx-auto flex min-h-0 w-full max-w-3xl flex-1 flex-col pb-6",children:u?e.jsx(k,{readOnly:!0}):c.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:"No messages in this conversation."}):e.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:[e.jsx(y,{messages:c,children:e.jsx(L,{readOnly:!0})}),l?e.jsxs("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:"mt-4 flex items-center gap-3 rounded-lg border border-border bg-muted/40 px-4 py-3 text-sm transition-colors hover:bg-muted",children:[e.jsx(T,{platform:o,className:"size-5 shrink-0"}),e.jsxs("span",{className:"text-muted-foreground",children:["This is a read-only copy. Continue the conversation with this agent in ",i,"."]}),e.jsxs("span",{className:"ml-auto shrink-0 whitespace-nowrap font-medium text-foreground",children:["Open ",i," →"]})]}):null]})})}function q(){const{owner:s,agentId:t,conversationId:a}=b.useParams();return e.jsx(S,{owner:s,agentId:t,conversationId:a})}export{q as component};
|
|
2
|
+
//# sourceMappingURL=_conversationId-98Y3RuRO.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as e,L as h,gK as f,bz as g,bM as j,aR as d,ho as y,hn as N,dY as m,bd as o,P as b,Q as v,af as D,g$ as w,bJ as S,iz as C}from"./index-
|
|
2
|
-
//# sourceMappingURL=_deploymentId-
|
|
1
|
+
import{j as e,L as h,gK as f,bz as g,bM as j,aR as d,ho as y,hn as N,dY as m,bd as o,P as b,Q as v,af as D,g$ as w,bJ as S,iz as C}from"./index-9YuSRymd.js";import{c as x,d as A}from"./deployments-body-DGII20dQ.js";import{J as I}from"./json-diff-DIN5Jhfx.js";import{b as B,a as L}from"./deployments-C5hvipQh.js";import"./index-CDz3-ieP.js";import"./index-Vcq4gwWv.js";const c="change-";function k({owner:t,deploymentId:s}){const a=s.startsWith(c),r=B(a?null:s),l=L(a?s.slice(c.length):null),i=a?l:r;return e.jsxs("div",{className:"max-w-3xl space-y-6",children:[e.jsxs(h,{to:"/$owner/connectors/deployments",params:{owner:t},className:"inline-flex items-center gap-1 text-xs text-muted-foreground transition-colors hover:text-foreground",children:[e.jsx(f,{className:"h-3 w-3"}),"All deployments"]}),i.isLoading?e.jsx(g,{label:"deployment",variant:"panel"}):i.isError?e.jsx(j,{label:"deployment"}):a?l.data?e.jsx(R,{change:l.data}):e.jsx(d,{icon:y,title:"Change not found",description:"This config change is not in the audit trail, or the server predates the deployments API."}):r.data?e.jsx($,{detail:r.data}):e.jsx(d,{icon:N,title:"Deployment not found",description:"This apply run is not in the audit trail, or the server predates the deployments API."})]})}function $({detail:t}){const{deployment:s,changes:a}=t;return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("header",{className:"space-y-3",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs("h2",{className:"text-lg font-semibold",children:["Deployment ",s.applyId?.slice(4,12)??s.id]}),A(s.status),s.gitDirty?e.jsx(b,{variant:"outline",children:"Dirty working tree"}):null]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[m(s.createdAt)," (",o(s.createdAt),")",s.createdBy?` · by ${s.createdBy}`:""]}),e.jsxs("dl",{className:"grid gap-1.5 text-xs",children:[s.applyId?e.jsx(n,{label:"Apply id",value:s.applyId,copyable:!0}):null,s.manifestHash?e.jsx(n,{label:"Manifest hash",value:s.manifestHash,copyable:!0}):null,s.gitSha?e.jsx(n,{label:"Git SHA",value:s.gitDirty?`${s.gitSha} (dirty)`:s.gitSha,copyValue:s.gitSha,copyable:!0}):null,s.cliVersion?e.jsx(n,{label:"CLI version",value:s.cliVersion,copyable:!0}):null]}),s.status==="partial_failure"&&s.error?e.jsx("div",{className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:s.error}):null]}),s.gitSha?e.jsxs("section",{className:v(D,"space-y-2 p-4"),children:[e.jsx("p",{className:"text-sm font-medium",children:"Rollback"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Rollback is git-first: revert the commit that produced this deployment, then re-apply."}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("code",{className:"font-mono text-xs",children:["git revert ",s.gitSha," && lobu apply"]}),e.jsx(p,{value:`git revert ${s.gitSha} && lobu apply`,label:"rollback command"})]})]}):null,e.jsxs("section",{className:"space-y-2",children:[e.jsxs("h3",{className:"text-sm font-medium",children:["Changes",e.jsx("span",{className:"ml-2 text-xs font-normal text-muted-foreground",children:a.length})]}),a.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:"No config changes in this apply run."}):e.jsx("div",{className:"overflow-hidden rounded-lg border",children:a.map((r,l)=>e.jsx(u,{change:r,isLast:l===a.length-1},r.id))})]})]})}function R({change:t}){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("header",{className:"space-y-3",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs("h2",{className:"text-lg font-semibold",children:[t.resourceKind??"config",t.resourceId?e.jsxs("span",{className:"text-muted-foreground",children:[" ",t.resourceId]}):null]}),x(t.op)]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[m(t.createdAt)," (",o(t.createdAt),")",t.actorSource?` · via ${t.actorSource}`:"",t.createdBy?` · by ${t.createdBy}`:""]})]}),e.jsx("section",{className:"overflow-hidden rounded-lg border",children:e.jsx(u,{change:t,isLast:!0})})]})}function u({change:t,isLast:s}){return e.jsxs("div",{className:`px-3 py-2.5 ${s?"":"border-b"}`,children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs("span",{className:"text-sm font-medium",children:[t.resourceKind??"config",t.resourceId?e.jsxs("span",{className:"text-muted-foreground",children:[" ",t.resourceId]}):null]}),x(t.op),e.jsx("span",{className:"ml-auto text-[11px] text-muted-foreground",children:o(t.createdAt)})]}),t.changedFields&&t.changedFields.length>0?e.jsxs("p",{className:"mt-1 text-[11px] text-muted-foreground",children:["Changed: ",t.changedFields.join(", ")]}):null,e.jsx(I,{before:t.before,after:t.after})]})}function n({label:t,value:s,copyValue:a,copyable:r}){return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("dt",{className:"w-24 shrink-0 text-muted-foreground",children:t}),e.jsxs("dd",{className:"flex min-w-0 items-center gap-1",children:[e.jsx("span",{className:"truncate font-mono",children:s}),r?e.jsx(p,{value:a??s,label:t}):null]})]})}function p({value:t,label:s}){return e.jsx("button",{type:"button","aria-label":`Copy ${s}`,className:"shrink-0 text-muted-foreground transition-colors hover:text-foreground",onClick:()=>{navigator.clipboard.writeText(t),S.success("Copied to clipboard")},children:e.jsx(w,{className:"h-3 w-3"})})}function J(){const{owner:t,deploymentId:s}=C.useParams();return e.jsx(k,{owner:t,deploymentId:s})}export{J as component};
|
|
2
|
+
//# sourceMappingURL=_deploymentId-B1UWPY0i.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{w as u,o as v,j as t,ai as x,b$ as d,c0 as f,c1 as h,bo as w,c2 as j}from"./index-
|
|
2
|
-
//# sourceMappingURL=_eventId-
|
|
1
|
+
import{w as u,o as v,j as t,ai as x,b$ as d,c0 as f,c1 as h,bo as w,c2 as j}from"./index-9YuSRymd.js";import{E as P}from"./event-detail-DV_zfWnC.js";import"./events-feed-DO3IiJO2.js";import"./conversations-table-D_HOe1jN.js";import"./clients-BhNl1tVq.js";import"./schema-value-normalization-CKdPjdPC.js";import"./card-jzhQrMDP.js";import"./view-param-filters-B0quibBi.js";import"./app-bridge-BCm4muqj.js";import"./filter-editors-Bwhqj7lY.js";function g({owner:e,eventId:a,viewKey:r}){const o=u({strict:!1}),l=v(),i=(n,s)=>t.jsx(P,{owner:s,organizationId:n,eventId:a,viewKey:r,params:r?f(o):{},onParamsChange:(m,c,p)=>void l({to:d(s,a,m),search:c,replace:p?.replace??!0}),fullBleed:!0},`${s}/${a}`);return t.jsx("div",{className:"flex flex-1 flex-col gap-6 px-4 pt-2.5 pb-8 lg:px-6",children:e==="me"?i(null,e):t.jsx(x,{owner:e,children:({organizationId:n,ownerSlug:s})=>n?i(n,s):t.jsx("div",{className:"mx-auto h-40 w-full max-w-3xl animate-pulse rounded-md bg-muted/40"})})})}function D(){const{owner:e,eventId:a}=h.useParams(),r=w({from:"/$owner/events/$eventId/-/views/$viewKey",shouldThrow:!1}),o=j(a);return o===null?null:t.jsx(g,{owner:e,eventId:o,viewKey:r?.viewKey})}export{D as component};
|
|
2
|
+
//# sourceMappingURL=_eventId-BAnr8g8z.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{i$ as a,j as e}from"./index-9YuSRymd.js";import{b as i}from"./agent-guardrails-route-TdvvIc_J.js";import"./model-selector-CDrAjH31.js";import"./agent-subpage-shell-CZJvnjNC.js";import"./agent-loading-shells-B7v6Cffw.js";import"./agent-card-controls-CplnPhbv.js";function l(){const{owner:t,agentId:r,name:o}=a.useParams();return e.jsx(i,{owner:t,agentId:r,name:o})}export{l as component};
|
|
2
|
+
//# sourceMappingURL=_name-BUfFO_A0.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/peek-pane-content-
|
|
2
|
-
import{u as h,a as p,j as e,p as m,r as x,D as k,b as g,c as w,d as v,e as j,f as b,g as y,B as d,C as N,L as P,A as R,X as E,l as S,_ as z,S as u,R as L,h as C,i as D,k as O,m as _,N as A,O as I}from"./index-
|
|
3
|
-
//# sourceMappingURL=_owner-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/peek-pane-content-BNR9ImQY.js","assets/index-9YuSRymd.js","assets/index-BSH07yVD.css","assets/automation-detail-content-DSwbRpbx.js","assets/create-automation-form-Bpy92SM5.js","assets/cronstrue-CWImw-kf.js","assets/entity-options-Clz_WXK-.js","assets/connection-label-BobuYiAG.js","assets/model-selector-CDrAjH31.js","assets/skill-editor-D_W3QlRz.js","assets/code-editor-CEqoCky-.js","assets/index-CDz3-ieP.js","assets/index-Vcq4gwWv.js","assets/use-mention-search-Dcunv4L0.js","assets/proposal-review-shell-CFhOqCLf.js","assets/json-diff-DIN5Jhfx.js","assets/deployments-C5hvipQh.js","assets/events-feed-DO3IiJO2.js","assets/conversations-table-D_HOe1jN.js","assets/clients-BhNl1tVq.js","assets/schema-value-normalization-CKdPjdPC.js","assets/card-jzhQrMDP.js","assets/agent-loading-shells-B7v6Cffw.js","assets/agent-thread-D38STyeu.js","assets/app-bridge-BCm4muqj.js","assets/connection-feed-detail-WcGCA6qY.js","assets/runs-table-B1APZv7d.js","assets/connector-scope-lists-CRFEpSvk.js","assets/connections-browser-CrtnAs0Q.js","assets/source-record-panels-BdfOVPWn.js","assets/event-detail-DV_zfWnC.js","assets/view-param-filters-B0quibBi.js","assets/filter-editors-Bwhqj7lY.js","assets/record-field-peek-Brh1IQGy.js","assets/record-session-Pbr5czGw.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{u as h,a as p,j as e,p as m,r as x,D as k,b as g,c as w,d as v,e as j,f as b,g as y,B as d,C as N,L as P,A as R,X as E,l as S,_ as z,S as u,R as L,h as C,i as D,k as O,m as _,N as A,O as I}from"./index-9YuSRymd.js";import{R as T}from"./record-session-Pbr5czGw.js";const B=S(async()=>({default:(await z(async()=>{const{PeekPaneContent:s}=await import("./peek-pane-content-BNR9ImQY.js");return{PeekPaneContent:s}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34]))).PeekPaneContent}));function W(){return e.jsxs("div",{"data-testid":"peek-pane-body-loading",className:"space-y-3 p-4",children:[e.jsx(u,{className:"h-5 w-2/3"}),e.jsx(u,{className:"h-4 w-full"}),e.jsx(u,{className:"h-24 w-full rounded-lg"})]})}function H(){const s=h(),a=p();return s?.item?e.jsx(U,{item:s.item,onClose:s.close,onBack:s.back,isNarrow:a}):null}function K(s){const a=s.href?b(s.href):null,n=a?.kind==="record-view"?a.viewKey:null,r=y({slug:n?a?.owner:void 0});return n&&r.data?.find(t=>t.key===n)?.name||s.title}function U({item:s,onClose:a,onBack:n,isNarrow:r}){const t=s.href?m(s.href):null,i=K(s);x.useEffect(()=>{if(r)return;const o=f=>{f.key==="Escape"&&(f.preventDefault(),a())};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[a,r]);const l=o=>e.jsxs("div",{className:"flex h-11 shrink-0 items-center gap-1 border-b border-border px-3",children:[n||o?e.jsx(d,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0 text-muted-foreground hover:text-foreground","aria-label":"Back",onClick:n??a,children:e.jsx(N,{className:"h-4 w-4"})}):null,e.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:i}),t?e.jsx(d,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0 text-muted-foreground hover:text-foreground","aria-label":"Open full page",asChild:!0,children:e.jsx(P,{to:t.pathname,search:t.search??{},onClick:a,children:e.jsx(R,{className:"h-4 w-4"})})}):null,e.jsx(d,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0 text-muted-foreground hover:text-foreground","aria-label":"Close preview",onClick:a,children:e.jsx(E,{className:"h-4 w-4"})})]}),c=e.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e.jsx(x.Suspense,{fallback:e.jsx(W,{}),children:e.jsx(B,{item:s})})});return r?e.jsx(k,{open:!0,onOpenChange:o=>{o||a()},children:e.jsxs(g,{children:[e.jsx(w,{className:"fixed inset-0 z-40 bg-black/60 data-[state=open]:animate-in data-[state=open]:fade-in-0"}),e.jsxs(v,{"aria-describedby":void 0,className:"fixed inset-y-0 right-0 z-50 flex w-full max-w-[460px] flex-col border-l border-border bg-background outline-none data-[state=open]:animate-in data-[state=open]:slide-in-from-right",children:[e.jsx(j,{className:"sr-only",children:i}),l(!0),c]})]})}):e.jsxs("aside",{className:"flex w-[460px] max-w-[45vw] shrink-0 flex-col border-l border-border bg-background",children:[l(!1),c]})}function q(){const{owner:s}=L.useParams(),{data:a,isLoading:n,error:r}=C(s==="me"?null:s,{slug:s}),{session:t,isReady:i}=D(),l=O(r)&&!a?.workspace;return _({active:!n&&!l&&i&&!t&&!a?.workspace,owner:s})?null:e.jsx(A,{children:e.jsx(T,{children:e.jsxs("div",{className:"flex min-h-0 flex-1 flex-row",children:[e.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto",children:e.jsx(I,{})}),e.jsx(H,{})]})})})}export{q as component};
|
|
3
|
+
//# sourceMappingURL=_owner-C79BwQ0I.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{iP as p,j as e,bn as m}from"./index-9YuSRymd.js";import{M as i}from"./memory-browse-page-D_UlBa27.js";import"./public-shell-ready-DqX8AXfw.js";import"./entity-type-page-DebN1vCM.js";import"./json-diff-DIN5Jhfx.js";import"./index-CDz3-ieP.js";import"./index-Vcq4gwWv.js";import"./code-editor-CEqoCky-.js";import"./schema-value-normalization-CKdPjdPC.js";import"./card-jzhQrMDP.js";import"./entity-avatar-mdh7Kq5D.js";import"./filter-editors-Bwhqj7lY.js";import"./core.esm-BupT3V0i.js";import"./view-param-filters-B0quibBi.js";import"./app-bridge-BCm4muqj.js";import"./member-scope-gate-DD4YBFn-.js";function h(){const{owner:t,entityType:o,shape:r}=p.useParams();return e.jsx(i,{ownerSlug:t,typeScope:m(o),create:!1,shape:r})}export{h as component};
|
|
2
|
+
//# sourceMappingURL=_shape-Ep6JpyFX.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{iZ as r,j as e}from"./index-9YuSRymd.js";import{b as m}from"./agent-skills-route-B3vvvZZe.js";import"./agent-subpage-shell-CZJvnjNC.js";import"./agent-skill-context-DFucg4c4.js";import"./core.esm-BupT3V0i.js";import"./skill-editor-D_W3QlRz.js";import"./agent-loading-shells-B7v6Cffw.js";import"./agent-card-controls-CplnPhbv.js";function c(){const{owner:t,agentId:o,skillKey:i}=r.useParams();return e.jsx(m,{owner:t,agentId:o,skillKey:i})}export{c as component};
|
|
2
|
+
//# sourceMappingURL=_skillKey-B24alBfT.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{g8 as m,n as d,o as x,eW as y,cC as c,j as t,bz as g}from"./index-
|
|
2
|
-
//# sourceMappingURL=_slug-
|
|
1
|
+
import{g8 as m,n as d,o as x,eW as y,cC as c,j as t,bz as g}from"./index-9YuSRymd.js";import{E as u}from"./entity-type-page-DebN1vCM.js";import"./json-diff-DIN5Jhfx.js";import"./index-CDz3-ieP.js";import"./index-Vcq4gwWv.js";import"./code-editor-CEqoCky-.js";function h(){const{owner:a,slug:n}=m.useParams(),{orgContext:s}=d(),o=x(),{data:i=[],isLoading:p}=y(s),e=i.find(l=>l.slug===n)??null,r=e?c(e):!1;return t.jsx("div",{className:"flex flex-1 flex-col gap-4 px-4 pt-2.5 pb-8 lg:px-6",children:t.jsx("div",{className:"max-w-3xl",children:p?t.jsx(g,{label:"entity type",variant:"panel"}):e?t.jsx(u,{entityType:e,orgContext:s,hideDelete:r,onClose:()=>{o({to:"/$owner/data",params:{owner:a}})}}):t.jsx("div",{className:"text-sm text-muted-foreground",children:"Entity type not found."})})})}export{h as component};
|
|
2
|
+
//# sourceMappingURL=_slug-DbPdDc-5.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{iW as t,j as m}from"./index-9YuSRymd.js";import{M as i}from"./memory-browse-page-D_UlBa27.js";import"./public-shell-ready-DqX8AXfw.js";import"./entity-type-page-DebN1vCM.js";import"./json-diff-DIN5Jhfx.js";import"./index-CDz3-ieP.js";import"./index-Vcq4gwWv.js";import"./code-editor-CEqoCky-.js";import"./schema-value-normalization-CKdPjdPC.js";import"./card-jzhQrMDP.js";import"./entity-avatar-mdh7Kq5D.js";import"./filter-editors-Bwhqj7lY.js";import"./core.esm-BupT3V0i.js";import"./view-param-filters-B0quibBi.js";import"./app-bridge-BCm4muqj.js";import"./member-scope-gate-DD4YBFn-.js";function R(){const{owner:o,viewKey:r}=t.useParams();return m.jsx(i,{ownerSlug:o,create:!1,viewKey:r})}export{R as component};
|
|
2
|
+
//# sourceMappingURL=_viewKey-DDUxjjFD.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{j2 as e,j as p,bn as i}from"./index-9YuSRymd.js";import{M as m}from"./memory-browse-page-D_UlBa27.js";import"./public-shell-ready-DqX8AXfw.js";import"./entity-type-page-DebN1vCM.js";import"./json-diff-DIN5Jhfx.js";import"./index-CDz3-ieP.js";import"./index-Vcq4gwWv.js";import"./code-editor-CEqoCky-.js";import"./schema-value-normalization-CKdPjdPC.js";import"./card-jzhQrMDP.js";import"./entity-avatar-mdh7Kq5D.js";import"./filter-editors-Bwhqj7lY.js";import"./core.esm-BupT3V0i.js";import"./view-param-filters-B0quibBi.js";import"./app-bridge-BCm4muqj.js";import"./member-scope-gate-DD4YBFn-.js";function M(){const{owner:t,entityType:o,viewKey:r}=e.useParams();return p.jsx(m,{ownerSlug:t,typeScope:i(o),create:!1,viewKey:r})}export{M as component};
|
|
2
|
+
//# sourceMappingURL=_viewKey-hdpq3RoX.js.map
|
package/dist/owletto/dist/assets/{accept-invitation-CRKbM2Xy.js → accept-invitation-UXU5Fx2G.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as l,aa as u,r as c,J as m,j as e,ab as d,ac as h,ad as f,$ as v,ae as x,a8 as g}from"./index-
|
|
2
|
-
//# sourceMappingURL=accept-invitation-
|
|
1
|
+
import{i as l,aa as u,r as c,J as m,j as e,ab as d,ac as h,ad as f,$ as v,ae as x,a8 as g}from"./index-9YuSRymd.js";import{F as p}from"./full-page-spinner-BVbcpW3R.js";function j({alt:t="",...n}){return e.jsx("img",{alt:t,...n,referrerPolicy:"no-referrer"})}function w({children:t}){const n=v(),a=async i=>{await n.invalidateQueries({queryKey:["organizations"]}),i()};return e.jsx(x,{authClient:g,navigate:i=>{a(()=>{window.location.href=i})},replace:i=>{a(()=>window.location.replace(i))},Link:({href:i,children:s,className:r})=>e.jsx("a",{href:i,className:r,children:s}),basePath:"/auth",redirectTo:"/",magicLink:!0,social:{providers:[]},avatar:{Image:j},children:t})}function b(){const{session:t,sessionResult:n}=l(),{invitationId:a}=u.useSearch(),i=c.useRef(!1);return c.useEffect(()=>{n.isPending||t||!a||i.current||(i.current=!0,(async()=>{let s=null;try{const o=await fetch(`${m}/api/invitation-preview?id=${encodeURIComponent(a)}`,{credentials:"omit"});o.ok&&(s=await o.json())}catch{}const r=new URL("/auth/login",window.location.origin);r.searchParams.set("callbackUrl",`/auth/accept-invitation?invitationId=${encodeURIComponent(a)}`),s&&(r.searchParams.set("loginHint",s.email),r.searchParams.set("invitationOrg",s.organizationName)),window.location.href=r.toString()})())},[t,n.isPending,a]),t&&!a?e.jsx("div",{className:"min-h-[calc(100vh-3.5rem)] flex items-center justify-center p-4",children:e.jsxs("div",{className:"w-full max-w-md text-center",children:[e.jsx("img",{src:"/lobu-logo.svg",alt:"Lobu",className:"mx-auto mb-6 h-8 w-auto"}),e.jsx(d,{className:"mx-auto h-10 w-10 text-destructive mb-4"}),e.jsx("h1",{className:"text-xl font-semibold",children:"Invitation not found"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"This invitation link is missing its ID. Ask the person who invited you to resend it."})]})}):t?e.jsxs("div",{className:"min-h-[calc(100vh-3.5rem)] flex flex-col items-center justify-center gap-6 p-4",children:[e.jsx("img",{src:"/lobu-logo.svg",alt:"Lobu",className:"h-8 w-auto"}),e.jsx(w,{children:e.jsx(h,{children:e.jsx(f,{})})})]}):e.jsx(p,{className:"min-h-[calc(100vh-3.5rem)]"})}export{b as component};
|
|
2
|
+
//# sourceMappingURL=accept-invitation-UXU5Fx2G.js.map
|
package/dist/owletto/dist/assets/{activity-route-view-CFLNukhD.js → activity-route-view-D7ORHntE.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c5 as Z,c6 as ee,c7 as se,c8 as O,c9 as te,ca as P,cb as S,cc as D,cd as ne,ce as $,cf as ae,cg as F,r as y,ch as ie,ci as oe,cj as re,j as e,ck as ce,cl as le,cm as de,bf as W,cn as ue,B as j,a2 as me,co as xe,cp as he,n as fe,bh as pe,a as ge,cq as B,bn as I,cr as ye,ao as je,cs as ve,bz as Ne,aR as C,ct as be,L as b,Q as z,ak as we,cu as U,cv as Y,cw as ke,bj as Me,ai as _e}from"./index-
|
|
2
|
-
//# sourceMappingURL=activity-route-view-
|
|
1
|
+
import{c5 as Z,c6 as ee,c7 as se,c8 as O,c9 as te,ca as P,cb as S,cc as D,cd as ne,ce as $,cf as ae,cg as F,r as y,ch as ie,ci as oe,cj as re,j as e,ck as ce,cl as le,cm as de,bf as W,cn as ue,B as j,a2 as me,co as xe,cp as he,n as fe,bh as pe,a as ge,cq as B,bn as I,cr as ye,ao as je,cs as ve,bz as Ne,aR as C,ct as be,L as b,Q as z,ak as we,cu as U,cv as Y,cw as ke,bj as Me,ai as _e}from"./index-9YuSRymd.js";import{R as Te,E as Ae,M as Ie}from"./record-activity-ZJntBfN_.js";import{M as Ce}from"./member-scope-gate-DD4YBFn-.js";import{P as Re}from"./public-shell-ready-DqX8AXfw.js";function Ee(s,t,o){const a=ne(),n=o?.locale??a.locale??te,r=Z(s,t);if(isNaN(r))throw new RangeError("Invalid time value");const i=Object.assign({},o,{addSuffix:o?.addSuffix,comparison:r}),[c,f]=ee(o?.in,...r>0?[t,s]:[s,t]),x=se(o?.roundingMethod??"round"),v=f.getTime()-c.getTime(),p=v/$,w=O(f)-O(c),m=(v-w)/$,g=o?.unit;let d;if(g?d=g:p<1?d="second":p<60?d="minute":p<P?d="hour":m<S?d="day":m<D?d="month":d="year",d==="second"){const l=x(v/1e3);return n.formatDistance("xSeconds",l,i)}else if(d==="minute"){const l=x(p);return n.formatDistance("xMinutes",l,i)}else if(d==="hour"){const l=x(p/60);return n.formatDistance("xHours",l,i)}else if(d==="day"){const l=x(m/P);return n.formatDistance("xDays",l,i)}else if(d==="month"){const l=x(m/S);return l===12&&g!=="month"?n.formatDistance("xYears",1,i):n.formatDistance("xMonths",l,i)}else{const l=x(m/D);return n.formatDistance("xYears",l,i)}}function Le(s,t){return Ee(s,ae(s),t)}const Oe=4e3;function Pe(s){if(s?.kind!=="browser"||!s.url)return null;try{return new URL(s.url).origin}catch{return null}}function Se(s,t){const o=Pe(t),{data:a=[]}=F(o?s:null),n=y.useMemo(()=>new Set(a.filter(c=>o&&c.browser?.origins.includes(o)).map(c=>c.key)),[a,o]),r=!!s&&n.size>0,{data:i=[]}=ie({...oe.queryOptions(s,{status:"active",enabled:r}),enabled:r,refetchInterval:c=>c.state.data?.some(f=>n.has(f.connector_key)&&f.active_runs>0)?Oe:!1});return y.useMemo(()=>i.filter(c=>n.has(c.connector_key)&&c.operations.includes("sync")),[i,n])}function De(s){return s.active_runs>0?{text:"Syncing…",failed:!1}:s.last_sync_status==="failed"&&s.last_error?{text:s.last_error,failed:!0}:s.last_sync_at?{text:`Last synced ${Le(new Date(s.last_sync_at),{addSuffix:!0})}.`,failed:!1}:{text:"Not synced yet. Sync while you're signed in.",failed:!1}}function $e({organizationId:s,feeds:t}){const{data:o=[]}=F(s),a=re();return t.length===0?null:e.jsx("section",{"aria-label":"This page",className:"space-y-1",children:e.jsx("ul",{className:"space-y-1",children:t.map(n=>{const r=De(n),i=n.active_runs>0||a.isPending&&a.variables===n.id,c=[n.connection_name??n.connector_name??n.connector_key,n.display_name??n.feed_key].join(" · ");return e.jsx("li",{className:"rounded-lg bg-primary/5 p-3",children:e.jsxs("div",{className:"flex gap-3",children:[e.jsx(ce,{className:le,children:e.jsx(de,{platform:n.connector_key,connectorDefinitions:o,label:c,fallback:e.jsx(W,{className:"h-4 w-4"})})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h4",{className:"line-clamp-2 min-w-0 text-sm font-medium",children:c}),e.jsx("p",{className:r.failed?"mt-1 line-clamp-3 text-sm text-destructive":"mt-1 text-sm text-muted-foreground",children:r.text}),e.jsx(ue,{tag:"This page",children:n.device_label?`Connection · ${n.device_label}`:"Connection"}),e.jsx("div",{className:"mt-2",children:e.jsxs(j,{type:"button",size:"sm",variant:r.failed?"default":"outline",className:"h-7 text-xs",disabled:i,onClick:()=>a.mutate(n.id),children:[i?e.jsx(me,{size:"sm",className:"mr-1"}):e.jsx(xe,{className:"mr-1 h-3 w-3"}),i?"Syncing":r.failed?"Try again":"Sync now"]})})]})]})},n.id)})})})}const ze=3;function Fe({organizationId:s,ownerSlug:t,typeScope:o,entityScope:a,activityTab:n="events",attentionOnly:r=!1}){const i=he(),c=Se(s,i),{orgContext:f}=fe(),{isMember:x,isLoading:v}=pe(),p=x&&!!s,w=ge(),m=n==="sessions"&&w,{attentionItems:g,isError:d}=B(t),l=o?I(o):void 0,R=!a&&!l,h=y.useMemo(()=>g.map(u=>({item:u,onPage:i?ye(u,i):!1})).sort((u,N)=>Number(N.onPage)-Number(u.onPage)||N.item.at-u.item.at),[g,i]),[E,q]=y.useState(!1),M=y.useMemo(()=>E?h:h.slice(0,ze),[h,E]),K=y.useMemo(()=>new Set(M.flatMap(({item:u})=>u.approvalRunId!=null?[u.approvalRunId]:[])),[M]),{data:_,isLoading:T,error:Q}=je(a?`/${t}/${ve(a)}`:`/${t}`,f),A=a?_?.entity:void 0,V=(a?A?.entity_type??I(a.split("/").at(-2)??""):l)==="$member",H=a!=null&&!T&&(Q!=null||_?.entity==null),k=a?void 0:_?.counts,J=k?k.connections>0||k.agents>0:!1,X=p&&!v&&!T&&k!=null&&!J,L=a&&T?e.jsx(Ne,{label:"Loading record…"}):H?e.jsx(C,{icon:be,title:"Record not found",description:"It may have been deleted, or it may live in a workspace you can't access."}):r&&R?e.jsx(Be,{owner:t,items:h,isError:d}):A?e.jsx(Te,{ownerSlug:t,entity:A,organizationId:s}):e.jsx(Ae,{organizationId:s,ownerSlug:t,hideSourceFilter:!0,scopedEntityTypes:l?[l]:void 0,notificationsFirst:R?{pinned:d||h.length>0||c.length>0?e.jsxs(e.Fragment,{children:[e.jsx($e,{organizationId:s,feeds:c}),d?e.jsx("p",{className:"px-3 text-sm text-destructive",children:"Could not load notifications."}):null,h.length>0?e.jsx(We,{owner:t,shown:M,total:h.length,onShowAll:()=>q(!0)}):null]}):null,hiddenApprovalRunIds:K,filterActions:h.length>0?e.jsx(G,{owner:t}):void 0}:void 0,emptyState:X?e.jsx(Ue,{ownerSlug:t}):void 0});return e.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col gap-4",children:[w?e.jsx("div",{className:"sticky top-0 z-20 flex min-w-0 flex-wrap items-center justify-center gap-x-4 gap-y-2 bg-background pt-1",children:e.jsxs("div",{className:"flex items-center rounded-lg bg-muted/60 p-0.5 text-xs",children:[e.jsx(b,{to:"/$owner/events",params:{owner:t},search:u=>{const N={...u??{}};return delete N.tab,N},"aria-current":m?void 0:"page",className:z("rounded-md px-2.5 py-1 text-xs font-medium transition-colors",m?"text-muted-foreground hover:text-foreground":"bg-background text-foreground "),children:"Events"}),e.jsx(b,{to:"/$owner/events",params:{owner:t},search:u=>({...u??{},tab:"sessions"}),"aria-current":m?"page":void 0,className:z("rounded-md px-2.5 py-1 text-xs font-medium transition-colors",m?"bg-background text-foreground ":"text-muted-foreground hover:text-foreground"),children:"Sessions"})]})}):null,m?e.jsx(we,{owner:t,tone:"page",empty:"message"}):V?e.jsx(Ce,{children:L}):L]})}function We({owner:s,shown:t,total:o,onShowAll:a}){const n=o-t.length;return e.jsxs("section",{"aria-label":"Needs attention",className:"space-y-1",children:[e.jsx("ul",{className:"space-y-1",children:t.map(({item:r,onPage:i})=>e.jsx("li",{children:e.jsx(Y,{owner:s,item:r,tone:i?"relevant":"default",tag:i?"This page":void 0})},r.id))}),n>0?e.jsxs(j,{type:"button",variant:"ghost",size:"sm",className:"ml-1 h-7 text-xs text-muted-foreground",onClick:a,children:["Show ",n," more"]}):null]})}function Be({owner:s,items:t,isError:o}){return e.jsxs("section",{"aria-label":"Needs attention",className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("h2",{className:"text-sm font-medium",children:["Needs attention",t.length>0?e.jsx("span",{className:"ml-2 text-muted-foreground tabular-nums",children:t.length}):null]}),e.jsx(G,{owner:s})]}),o?e.jsx("p",{className:"px-3 text-sm text-destructive",children:"Could not load notifications."}):t.length===0?e.jsx(C,{icon:U,title:"All caught up",description:"Nothing needs you right now.",children:e.jsx(j,{asChild:!0,variant:"outline",className:"mt-4",children:e.jsx(b,{to:"/$owner",params:{owner:s},children:"See all activity"})})}):e.jsx("ul",{className:"space-y-1",children:t.map(({item:a,onPage:n})=>e.jsx("li",{children:e.jsx(Y,{owner:s,item:a,tone:n?"relevant":"default",tag:n?"This page":void 0})},a.id))})]})}function G({owner:s}){const{visibleUnreadIds:t,markVisibleRead:o,bulkPending:a}=B(s);return t.length===0?null:e.jsxs(j,{type:"button",variant:"ghost",size:"sm",className:"h-8 text-muted-foreground",disabled:a,onClick:()=>void o(),children:[e.jsx(U,{className:"mr-1.5 h-3.5 w-3.5"}),"Mark all as read"]})}function Ue({ownerSlug:s}){return e.jsx("div",{className:"px-6",children:e.jsx(C,{icon:ke,title:"Nothing to catch up on — yet",description:"No notifications here. Add a connector to bring in data, or bring your agent to Lobu and give it something to work with.",children:e.jsxs("div",{className:"mt-4 flex flex-wrap justify-center gap-2",children:[e.jsx(j,{asChild:!0,children:e.jsxs(b,{to:"/$owner/connectors/create",params:{owner:s},children:[e.jsx(W,{className:"mr-2 h-4 w-4"}),"Add a connector"]})}),e.jsx(j,{asChild:!0,variant:"outline",children:e.jsxs(b,{to:"/$owner/agents",params:{owner:s},children:[e.jsx(Me,{className:"mr-2 h-4 w-4"}),"Connect agent"]})})]})})})}function Ve({owner:s,search:t,entityScope:o}){const a=typeof t.type=="string"&&t.type.trim()?I(t.type.trim()):void 0,n=t.tab==="sessions"?"sessions":"events",r=String(t.attention)==="1";return e.jsxs("div",{className:"flex flex-1 flex-col gap-6 px-4 pt-2.5 pb-8 lg:px-6",children:[e.jsx(Re,{}),e.jsx(_e,{owner:s,children:i=>e.jsx(Ie,{organizationId:i.organizationId,isWorkspaceLoading:i.isWorkspaceLoading,children:e.jsx("div",{className:"mx-auto flex min-h-0 w-full min-w-0 max-w-3xl flex-1 flex-col",children:e.jsx(Fe,{organizationId:i.organizationId,ownerSlug:i.ownerSlug,typeScope:a,entityScope:o,activityTab:n,attentionOnly:r})})})})]})}export{Ve as A};
|
|
2
|
+
//# sourceMappingURL=activity-route-view-D7ORHntE.js.map
|
package/dist/owletto/dist/assets/{agent-card-controls-Be1Okb2C.js → agent-card-controls-CplnPhbv.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as e,eS as i,dF as l,Q as c}from"./index-
|
|
2
|
-
//# sourceMappingURL=agent-card-controls-
|
|
1
|
+
import{j as e,eS as i,dF as l,Q as c}from"./index-9YuSRymd.js";function d({enabled:t,name:s,expanded:r,onToggleEnabled:a,toggleDisabled:n,onToggle:o}){return e.jsxs("div",{className:"flex shrink-0 items-center gap-2 self-center",children:[e.jsx(i,{checked:t,onCheckedChange:a,disabled:n,"aria-label":t?`Disable ${s}`:`Enable ${s}`}),e.jsx("button",{type:"button",onClick:o,"aria-label":r?"Collapse":"Expand",className:"text-muted-foreground transition-colors hover:text-foreground",children:e.jsx(l,{className:c("h-4 w-4 transition-transform",r&&"rotate-90")})})]})}export{d as A};
|
|
2
|
+
//# sourceMappingURL=agent-card-controls-CplnPhbv.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{j as o,L as u,bk as c}from"./index-
|
|
1
|
+
import{j as o,L as u,bk as c}from"./index-9YuSRymd.js";const d="https://raw.githubusercontent.com/lobu-ai/lobu/main/claude-plugin/skills/lobu/SKILL.md";function a(e){try{const t=new URL(e).hostname;return t==="lobu.ai"||t.endsWith(".lobu.ai")}catch{return!1}}function l(e,t){const n=`npx @lobu/cli@latest connect ${e}`;return a(t)?n:`${n} --url ${t}`}const i=[{id:"claude-code",label:"Claude Code",tagline:"Shared plugin with Lobu MCP and workspace skills",description:"Connect Claude Code to shared workspace context and governed actions through Lobu's native plugin setup.",installTitle:"Run in your terminal",installText:e=>l("claude-code",e),steps:e=>a(e)?["The CLI adds Lobu's marketplace and installs the shared plugin.","Start a fresh Claude Code session.","Use a Lobu tool, choose this workspace, and complete OAuth when prompted."]:["The CLI registers this MCP endpoint and installs the Lobu workspace skill.","Start a fresh Claude Code session and complete OAuth when prompted."],guideLinks:[{label:"Claude Code setup guide",href:"https://lobu.ai/connect-from/claude-code/"}]},{id:"chatgpt",label:"ChatGPT & Codex",tagline:"Web connector and coding agent for one workspace",description:"Add Lobu as a custom ChatGPT connector, or connect the Codex coding agent through the CLI — both reach this workspace with your existing Lobu access.",installTitle:"Pick a surface",installText:e=>["ChatGPT web — open Settings -> Connectors -> Create connector","Name: Lobu",`MCP URL: ${e}`,"Authentication: OAuth","",`Codex — ${l("codex",e)}`].join(`
|
|
2
2
|
`),steps:e=>["ChatGPT web: turn on developer mode under Settings -> Security -> Developer mode (custom connectors need it).",`ChatGPT web: open Settings -> Connectors -> Create connector, name it Lobu, and use ${e} with OAuth.`,"ChatGPT web: scan tools, complete Lobu sign-in, and start a new chat with Lobu enabled.",...a(e)?["Codex: run the command above — the CLI adds Lobu's marketplace and installs the shared plugin."]:["Codex: run the command above — the CLI registers this MCP endpoint and installs the Lobu workspace skill."],"Codex: start a fresh session, choose this workspace, and complete OAuth when prompted."],guideLinks:[{label:"ChatGPT setup guide",href:"https://lobu.ai/connect-from/chatgpt/"},{label:"Codex setup guide",href:"https://lobu.ai/connect-from/codex/"}]},{id:"claude-desktop",label:"Claude Desktop",tagline:"Custom MCP connector with Lobu OAuth",description:"Add Lobu as a custom Claude Desktop connector and authorize the workspace with your existing Lobu access.",installTitle:"Add from Claude settings",installText:e=>["Open Settings -> Connectors -> Add Custom Connector","Name: Lobu",`MCP URL: ${e}`].join(`
|
|
3
3
|
`),steps:e=>["Open Settings -> Connectors -> Add Custom Connector.",`Name it Lobu and use ${e}.`,"Enable Lobu and complete OAuth.","Start a new conversation with Lobu enabled."],guideLinks:[{label:"Claude setup guide",href:"https://lobu.ai/connect-from/claude/"}]},{id:"opencode",label:"OpenCode",tagline:"Native remote MCP plus a global Lobu skill",description:"Connect OpenCode through its native MCP setup and install the Lobu workspace skill globally.",installTitle:"Run in your terminal",installText:e=>`npx @lobu/cli@latest connect opencode --url ${e}`,steps:e=>[`The CLI launches OpenCode's native MCP setup for ${e}.`,"Choose remote and name the server lobu.","Run opencode mcp auth lobu and complete OAuth.","The CLI installs the Lobu skill into OpenCode's global skill directory.","Start a fresh OpenCode session."],guideLinks:[{label:"OpenCode MCP guide",href:"https://opencode.ai/docs/mcp-servers/"}]},{id:"antigravity",label:"Antigravity CLI",tagline:"Native remote MCP plus a global Lobu skill",description:"Connect Antigravity CLI through its native MCP profile and install the Lobu workspace skill globally.",installTitle:"Run in your terminal",installText:e=>`npx @lobu/cli@latest connect antigravity --url ${e}`,steps:()=>["The CLI adds Lobu to Antigravity's global MCP profile using serverUrl.","The CLI installs lobu.md into Antigravity CLI's global skills directory.","Start a fresh session with agy, confirm Lobu in /mcp, and complete OAuth when prompted."],guideLinks:[{label:"Antigravity MCP guide",href:"https://antigravity.google/docs/mcp"}]},{id:"cursor",label:"Cursor",tagline:"Native remote MCP setup",description:"Connect Cursor to shared workspace context and governed actions through its native MCP configuration.",installTitle:"Run in your terminal",installText:e=>`npx @lobu/cli@latest connect cursor --url ${e}`,steps:()=>["The CLI adds or updates the Lobu entry in Cursor's MCP configuration.","Restart Cursor and enable the Lobu MCP server.","Use a Lobu tool and complete OAuth when prompted."],guideLinks:[{label:"Lobu MCP reference",href:"https://lobu.ai/reference/mcp/"}]},{id:"openclaw",label:"OpenClaw",tagline:"Connect from your agent's workspace",description:"Let OpenClaw connect to Lobu through MCP or sign in with the Lobu CLI in its terminal.",installTitle:"Paste this into OpenClaw",setupMode:"agent-prompt",terminalLogin:!0,steps:()=>["Paste the prompt into OpenClaw and review its proposed setup.","Approve Lobu sign-in in your browser or through the email approval link.","Let OpenClaw verify access with a harmless read in this workspace."],guideLinks:[{label:"OpenClaw terminal guide",href:"https://docs.openclaw.ai/tools/exec"}]},{id:"hermes",label:"Hermes",tagline:"Remote MCP or Lobu CLI sign-in",description:"Let Hermes configure Lobu with its MCP tools or sign in with the Lobu CLI in its terminal.",installTitle:"Paste this into Hermes",setupMode:"agent-prompt",terminalLogin:!0,steps:()=>["Paste the prompt into Hermes and review its proposed setup.","Approve Lobu sign-in in your browser or through the email approval link.","Let Hermes verify access with a harmless read in this workspace."],guideLinks:[{label:"Hermes MCP guide",href:"https://hermes-agent.nousresearch.com/docs/user-guide/features/mcp/"}]},{id:"other",label:"Other agent",tagline:"Let your agent configure Lobu",description:"Paste a setup prompt into another MCP-compatible agent and let it propose the exact skill and MCP configuration.",installTitle:"Paste this into your agent",setupMode:"agent-prompt",steps:()=>["Paste the prompt into the agent you want to connect.","Review the exact configuration and skill files it proposes before approving changes.","Complete Lobu OAuth and let the agent perform its read-only verification."],guideLinks:[{label:"Lobu MCP reference",href:"https://lobu.ai/reference/mcp/"}]}],h={codex:"chatgpt"};function b(e){const t=h[e]??e;return i.find(n=>n.id===t)}function g(e){const{workspaceName:t,owner:n,mcpUrl:s,clientLabel:r}=e;return[`Connect this${r?` ${r}`:""} agent to the "${t}" Lobu workspace (${n}).`,"",`Use the remote HTTP MCP server ${s}. Detect this agent's native MCP and skill mechanisms. If it supports installable skills, install the Lobu workspace skill from ${d}.`,"Inspect the current client and show the exact proposed installation or configuration changes before applying them. The Lobu CLI may be used as the setup helper, but do not initialize a Lobu project. Do not install the separate project-building starter skill. Do not enable local Automation delivery.",...e.terminalLogin?[`If native remote MCP with OAuth is unavailable, use the Lobu CLI in this agent's persistent terminal environment. Before logging in, inspect CLI help and existing contexts to select the same Lobu server and workspace as the MCP URL above; never silently use the hosted server for a custom endpoint. If no context matches that server, create one with npx @lobu/cli@latest context add <name> --url <server-base-url>. Ask for the user's Lobu email address, then run npx @lobu/cli@latest login --email <address> --context <name> and wait for the user to approve the email link. Keep credentials in the CLI's own persistent storage; never print tokens or paste them into chat. Run npx @lobu/cli@latest memory health --context <name> --org ${n}, then make a harmless read using the CLI with the same --context and --org options.`]:[],"","For native MCP, complete Lobu OAuth in the user's browser, then start a fresh session and confirm Lobu tools are discoverable. After either setup path, make one harmless read-only call in the selected workspace. Use search_sdk before choosing SDK methods. Never fabricate a returned URL or identifier."].join(`
|
|
4
4
|
`)}function p(e,t){return`flex items-center gap-3 px-3 py-2.5 text-left text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground ${e===t-1?"":"border-b"}`}function C({owner:e,dashed:t=!1}){return o.jsx("div",{className:`overflow-hidden rounded-lg border ${t?"border-dashed":""}`,children:i.map((n,s)=>o.jsxs(u,{to:"/$owner/agents/connect/$clientId",params:{owner:e,clientId:n.id},className:p(s,i.length),children:[o.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center text-muted-foreground",children:o.jsx(c,{name:n.label})}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsx("p",{className:"truncate text-sm font-medium",children:n.label}),o.jsx("p",{className:"truncate text-xs text-muted-foreground",children:n.tagline})]}),o.jsx("span",{className:"shrink-0 text-xs",children:"Set up"})]},n.id))})}export{C as A,g as b,b as f};
|
|
5
|
-
//# sourceMappingURL=agent-client-setup-list-
|
|
5
|
+
//# sourceMappingURL=agent-client-setup-list-BlXB4SE5.js.map
|
package/dist/owletto/dist/assets/{agent-connect-pages-CAV-yXus.js → agent-connect-pages-BmknviTI.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{J as m,j as e,aC as b,g9 as N,ag as A,ga as L,L as p,gb as w,h as k,r as C,ht as S,hL as x,B as y,A as I,bk as f,dy as P,g$ as R}from"./index-
|
|
2
|
-
//# sourceMappingURL=agent-connect-pages-
|
|
1
|
+
import{J as m,j as e,aC as b,g9 as N,ag as A,ga as L,L as p,gb as w,h as k,r as C,ht as S,hL as x,B as y,A as I,bk as f,dy as P,g$ as R}from"./index-9YuSRymd.js";import{A as $,f as M,b as T}from"./agent-client-setup-list-BlXB4SE5.js";import{u as _}from"./clients-BhNl1tVq.js";import{g as B,c as U}from"./client-rows-BYbsXGy9.js";function E(t){const n=t?`/mcp/${t}`:"/mcp";if(!m)return`http://localhost:8787${n}`;try{const s=new URL(m);return s.pathname=n,s.toString()}catch{return`${m}${n}`}}const u="flex min-h-0 flex-1 flex-col gap-3 px-4 pt-2.5 pb-8 lg:px-6";function D(t,n){return`flex items-center gap-3 px-3 py-2.5 text-left text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground ${t===n-1?"":"border-b"}`}function v({owner:t}){return e.jsx(L,{crumbs:[e.jsx(p,{to:"/$owner/agents",params:{owner:t},className:w,children:"Agents"},"agents")]})}function q({owner:t}){return e.jsx("div",{className:u,children:e.jsxs(b,{className:"flex flex-1 flex-col gap-6",children:[e.jsx(N,{breadcrumb:e.jsx(v,{owner:t}),icon:e.jsx(A.agents.icon,{className:"h-6 w-6"}),title:"Connect an agent",caption:"Choose the agent you already use. Install directly where supported, or copy a setup prompt into the agent."}),e.jsx($,{owner:t}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Local Automation delivery is separate and is not enabled by connecting an agent."})]})})}function j({text:t,label:n}){const[s,l]=C.useState(!1);return e.jsxs(y,{type:"button",variant:"outline",size:"sm",className:"h-8 text-xs",onClick:()=>{typeof navigator>"u"||!navigator.clipboard||navigator.clipboard.writeText(t).then(()=>{l(!0),setTimeout(()=>l(!1),1500)})},children:[s?e.jsx(P,{className:"mr-1.5 h-3.5 w-3.5"}):e.jsx(R,{className:"mr-1.5 h-3.5 w-3.5"}),s?"Copied":n]})}function F({owner:t,clientId:n}){const s=M(n),{data:l}=k(t,{slug:t}),{data:h=[]}=_(null,{refetchInterval:2500}),r=C.useMemo(()=>B(h).filter(a=>a.connected),[h]);if(!s)return e.jsx("div",{className:u,children:e.jsxs(b,{className:"space-y-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"There is no agent client by that name."}),e.jsx(p,{to:"/$owner/agents/connect",params:{owner:t},className:"text-sm text-primary hover:underline",children:"Back to agent clients"})]})});const o=E(t),c=T({workspaceName:l?.workspace?.name??t,owner:t,mcpUrl:o,clientLabel:s.id==="other"?void 0:s.label,terminalLogin:s.terminalLogin}),i=s.setupMode==="agent-prompt",g=i?c:s.installText?.(o)??c;return e.jsx("div",{className:u,children:e.jsxs(S,{header:e.jsx(N,{breadcrumb:e.jsx(v,{owner:t}),icon:e.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md border",children:e.jsx(f,{name:s.label})}),title:s.label,caption:s.description}),children:[e.jsx(x,{title:"Set up",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:s.installTitle}),e.jsxs("div",{className:"flex items-start gap-2 rounded-lg border bg-muted/40 p-2.5",children:[e.jsx("pre",{className:"min-w-0 flex-1 overflow-x-auto whitespace-pre-wrap font-mono text-xs leading-relaxed",children:g}),e.jsx(j,{text:g,label:i?"Copy setup prompt":"Copy"})]})]}),e.jsx("ol",{className:"space-y-1 text-xs text-muted-foreground",children:s.steps(o).map((a,d)=>e.jsxs("li",{children:[d+1,". ",a]},a))}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[i?null:e.jsx(j,{text:c,label:"Copy setup prompt"}),s.guideLinks.map(a=>e.jsx(y,{asChild:!0,variant:"ghost",size:"sm",className:"h-8 text-xs",children:e.jsxs("a",{href:a.href,target:"_blank",rel:"noreferrer",children:[a.label,e.jsx(I,{className:"ml-1.5 h-3.5 w-3.5"})]})},a.href))]})]})}),e.jsx(x,{title:"Connected agents",count:r.length>0?String(r.length):void 0,children:r.length===0?e.jsx("div",{className:"rounded-lg border border-dashed px-3 py-2.5 text-xs text-muted-foreground",children:"Nothing yet. Finish setup and make an authenticated Lobu MCP request; the agent appears here automatically."}):e.jsx("div",{className:"overflow-hidden rounded-lg border",children:r.map((a,d)=>e.jsxs(p,{to:"/$owner/agents/connected/$clientId",params:{owner:t,clientId:a.clientId},className:D(d,r.length),children:[e.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md border",children:e.jsx(f,{name:a.title})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"truncate text-sm font-medium",children:a.title}),e.jsx("p",{className:"truncate text-xs text-muted-foreground",children:U(a)})]})]},a.key))})}),e.jsx(x,{title:"Manual MCP details",children:e.jsxs("dl",{className:"grid grid-cols-[5rem_1fr] gap-x-3 gap-y-1 rounded-lg border bg-muted/40 p-3 text-xs",children:[e.jsx("dt",{className:"text-muted-foreground",children:"Name"}),e.jsx("dd",{className:"font-mono",children:"lobu"}),e.jsx("dt",{className:"text-muted-foreground",children:"MCP URL"}),e.jsx("dd",{className:"break-all font-mono",children:o})]})})]})})}export{q as A,F as a};
|
|
2
|
+
//# sourceMappingURL=agent-connect-pages-BmknviTI.js.map
|
package/dist/owletto/dist/assets/{agent-editor-form-Bi6WvYX-.js → agent-editor-form-DsSoeQeF.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ax as ye,ay as Ne,j as e,B as j,cX as Ce,et as Se,a$ as Me,Q as Ae,eE as ke,cF as H,dy as J,cT as Ie,h8 as Pe,h9 as Te,ha as Fe,hb as De,gj as Re,hc as Ee,bQ as _e,bR as $e,az as Le,r as K,bJ as $,f4 as Y,bU as Be,z as b,fN as L,I as O,T as ze,bp as Ue,bq as Oe,br as qe,bs as Ve,bt as Z}from"./index-DYCqXaMf.js";import{b as Xe,s as Ge}from"./model-selector-TQcA93xm.js";function Qe(a){const t=a.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").replace(/-{2,}/g,"-");return(t?/^[a-z]/.test(t)&&t.length>=3?t:`agent-${t}`:"agent").slice(0,60).replace(/-+$/g,"")||"agent"}function We(a,t){const r=new Set(t),x=Qe(a);let v=x,u=2;for(;r.has(v);){const g=`-${u}`;v=`${x.slice(0,Math.max(1,60-g.length)).replace(/-+$/g,"")||"agent"}${g}`,u+=1}return v}const He="__unresolved__";function ee(a){return a.endsWith(`/${He}`)}function se(a){const t=a.indexOf("/");return t===-1?{slug:a,model:""}:{slug:a.slice(0,t),model:a.slice(t+1)}}function Je(a,t){const{slug:r,model:x}=se(a);return{provider:t.find(g=>g.value===a)?.provider??t.find(g=>se(g.value).slug===r)?.provider??r,model:x}}function Ke({value:a,onChange:t,disabled:r}){const{data:x=[]}=ye(),{data:v=[]}=Ne(),u=Xe(x,v),g=(s,c)=>{const l=s+c;if(l<0||l>=a.length)return;const m=[...a];[m[s],m[l]]=[m[l],m[s]],t(m)},k=s=>{t(a.filter((c,l)=>l!==s))},I=s=>{a.includes(s)||t([...a,s])},o=u.filter(s=>!a.includes(s.value)&&!ee(s.value));return e.jsxs("div",{className:"grid gap-2",children:[a.length===0?e.jsx("p",{className:"rounded-lg border border-dashed bg-muted/20 px-3 py-4 text-center text-[11px] text-muted-foreground",children:"No models pinned — this agent uses the org default."}):e.jsx("ul",{className:"grid gap-1.5",children:a.map((s,c)=>{const l=ee(s),{provider:m,model:i}=Je(s,u);return e.jsxs("li",{className:Ae("flex items-center gap-2 rounded-lg border bg-muted/20 px-3 py-2",l&&"opacity-60"),children:[e.jsxs("div",{className:"grid min-w-0 flex-1 gap-0.5",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"truncate text-sm",children:m}),c===0?e.jsx("span",{className:"shrink-0 rounded bg-primary/10 px-1.5 py-0.5 text-[10px] font-medium text-primary",children:"Default"}):null]}),e.jsx("span",{className:"truncate text-[11px] text-muted-foreground",children:l?"no model selected":i})]}),e.jsxs("div",{className:"flex shrink-0 items-center gap-0.5",children:[e.jsx(j,{type:"button",variant:"ghost",size:"icon",className:"h-7 w-7","aria-label":"Move up",disabled:r||c===0,onClick:()=>g(c,-1),children:e.jsx(Ce,{className:"h-4 w-4"})}),e.jsx(j,{type:"button",variant:"ghost",size:"icon",className:"h-7 w-7","aria-label":"Move down",disabled:r||c===a.length-1,onClick:()=>g(c,1),children:e.jsx(Se,{className:"h-4 w-4"})}),e.jsx(j,{type:"button",variant:"ghost",size:"icon",className:"h-7 w-7 text-destructive hover:text-destructive","aria-label":"Remove model",disabled:r,onClick:()=>k(c),children:e.jsx(Me,{className:"h-4 w-4"})})]})]},s)})}),e.jsx(ke,{contentClassName:"w-[--radix-popover-trigger-width] min-w-[280px]",searchPlaceholder:"Search or type a model ref…",emptyText:"Type a full provider/model ref to use it.",trigger:s=>e.jsxs(j,{type:"button",variant:"outline",role:"combobox","aria-expanded":s,disabled:r,className:"w-full justify-start font-normal text-muted-foreground",children:[e.jsx(Ie,{className:"mr-2 h-4 w-4 shrink-0"}),"Add model"]}),children:(s,c)=>{const l=c.trim(),m=Ge(l,u)&&!a.includes(l);return e.jsxs(e.Fragment,{children:[o.map(i=>e.jsxs(H,{value:`${i.provider} ${i.model} ${i.value}`,onSelect:()=>{I(i.value),s()},className:"cursor-pointer",children:[e.jsx(J,{className:"mr-2 h-4 w-4 opacity-0"}),e.jsxs("span",{className:"truncate",children:[i.provider," ",e.jsx("span",{className:"text-muted-foreground text-xs",children:i.model}),i.isDefault?e.jsx("span",{className:"ml-1.5 text-muted-foreground text-xs",children:"· org default"}):null]})]},i.value)),m?e.jsxs(H,{value:`__custom__ ${l}`,onSelect:()=>{I(l),s()},className:"cursor-pointer",children:[e.jsx(J,{className:"mr-2 h-4 w-4 opacity-0"}),e.jsxs("span",{children:["Use ",e.jsx("span",{className:"font-mono text-xs",children:l})]})]}):null]})}})]})}const Ye=3,Ze=72,es=2e3;function te(a){return Array.from({length:Ye},(t,r)=>a?.[r]??{title:"",message:""})}function ae(a){return a.map(({title:t,message:r})=>({title:t.trim(),message:r.trim()})).filter(({title:t,message:r})=>t&&r)}function ns({mode:a,section:t="identity",existingAgentIds:r=[],onCreated:x,onCancel:v,onDone:u,reviewMode:g="none",reviewProposal:k=null,reviewControlsDisabled:I=!1}){const o=a.kind==="create",s=a.kind==="edit"?a.agent:null,c=!o&&t!=="platforms"&&t!=="skills"&&!!s,l=Pe(),m=Te(s?.agentId??""),i=Fe(s?.agentId??""),P=De(s?.agentId??""),{data:p,isLoading:q}=Re(s?.agentId,{enabled:c}),V=!o&&g==="active"?k:null,B=V?Ee(V.proposal):void 0,N=p,X=s?.agentId??"create",d=_e(X,{name:B?.name??s?.name??"",description:B?.description??s?.description??"",identityMd:B?.identityMd??p?.identityMd??"",soulMd:p?.soulMd??"",userMd:p?.userMd??"",models:N?.models??N?.settings?.models??[],showToolCalls:N?.showToolCalls??N?.settings?.showToolCalls??!1,sandboxId:N?.sandboxId??N?.settings?.sandboxId??"builtin",starters:te(p?.starters)}),[w,ne]=d.field("name"),[C,le]=d.field("description"),[T,re]=d.field("identityMd"),[F,ie]=d.field("soulMd"),[D,de]=d.field("userMd"),[R,oe]=d.field("models"),[E,ce]=d.field("showToolCalls"),[S,me]=d.field("sandboxId"),[y,G]=d.field("starters"),[ue,_]=$e(X,!1),{data:ge}=Le({enabled:t==="models"&&!o}),he=K.useCallback(async n=>{if(n.preventDefault(),!!d.canSubmit){if(o){const h=await l.mutateAsync({agentId:We(w,r),name:w.trim(),description:C.trim()||void 0});x?await x(h.agentId):u?.();return}if(s){if(!p){$.error("Still loading agent settings — try again in a moment");return}if(y.some(({title:h,message:M})=>!!h.trim()!=!!M.trim())){$.error("Add both a title and a message for each conversation starter");return}try{await Promise.all([m.mutateAsync({name:w.trim()||s.name,description:C.trim()||void 0}),P.mutateAsync({identityMd:T.trim(),soulMd:F.trim(),userMd:D.trim(),models:R,authProfiles:p.authProfiles??[],skillsConfig:p.skillsConfig,showToolCalls:E,sandboxId:S==="builtin"?void 0:S,starters:ae(y)})]),d.accept(d.values,{name:w.trim()||s.name,description:C.trim()||s.description||"",identityMd:T.trim(),soulMd:F.trim(),userMd:D.trim(),models:R,showToolCalls:E,sandboxId:S,starters:te(ae(y))}),$.success("Agent saved"),u?.()}catch(h){$.error(h instanceof Error?h.message:"Failed to save agent")}}}},[p,l,C,d.accept,d.values,d.canSubmit,S,r,T,o,R,w,x,u,s,E,F,y,m,P,D]),xe=K.useCallback(async()=>{s&&(await i.mutateAsync(),_(!1),u?.())},[i,u,s,_]),z=l.isPending||m.isPending||i.isPending||P.isPending,pe=o||!!p;if(c&&q)return e.jsx(Y,{rows:6});const f=z||I,fe=g==="none"||g==="gone",ve=w.trim().length>0&&pe,be=o||t==="settings",je=!o&&(t==="identity"||t==="settings"),we=!o&&t==="settings",Q=!o&&t==="settings",W=!o&&t==="models";return e.jsxs("form",{onSubmit:he,className:"flex min-h-0 flex-col",children:[e.jsx(Be,{visible:d.hasConflict,onReload:d.reset}),e.jsxs("div",{className:"grid content-start gap-4 py-2",children:[je?q?e.jsx(Y,{rows:4}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(b,{htmlFor:"identity-md",children:"Identity"}),e.jsx(L,{id:"identity-md",rows:6,value:T,onChange:n=>re(n.target.value),disabled:f,placeholder:"You are a market intelligence agent. Track competitors, analyze launches and signals, and surface concise, decision-ready insights."})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(b,{htmlFor:"soul-md",children:"Soul"}),e.jsx(L,{id:"soul-md",rows:6,value:F,onChange:n=>ie(n.target.value),disabled:f,placeholder:"Be rigorous, skeptical of weak signals, and calm under ambiguity. Prefer crisp summaries, explicit evidence, and clear confidence levels."})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(b,{htmlFor:"user-md",children:"User prompt"}),e.jsx(L,{id:"user-md",rows:6,value:D,onChange:n=>de(n.target.value),disabled:f,placeholder:"Monitor the market for notable competitor moves, pricing changes, launches, partnerships, and customer sentiment shifts. Summarize what changed, why it matters, and what to watch next."})]})]}):null,be?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(b,{htmlFor:"agent-name",children:["Name ",e.jsx("span",{className:"ml-1 text-destructive",children:"*"})]}),e.jsx(O,{id:"agent-name",placeholder:"Support Bot",value:w,onChange:n=>ne(n.target.value),disabled:f,required:!0}),o?e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"The agent ID will be generated automatically from the name."}):null]}),o?null:e.jsxs("div",{className:"grid gap-2",children:[e.jsx(b,{htmlFor:"agent-description",children:"Description"}),e.jsx(L,{id:"agent-description",placeholder:"Handles customer support and triage across channels.",value:C,onChange:n=>le(n.target.value),disabled:f,rows:3})]})]}):null,Q?e.jsxs("div",{className:"flex items-start gap-3 rounded-lg border bg-muted/20 p-3",children:[e.jsx(ze,{id:"show-tool-calls",checked:E,onCheckedChange:n=>ce(n===!0),disabled:f,className:"mt-0.5"}),e.jsxs("div",{className:"grid gap-0.5",children:[e.jsx(b,{htmlFor:"show-tool-calls",className:"cursor-pointer",children:"Show tool calls in chat"}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Render the agent's tool invocations (name, arguments, and result) as cards in the web chat. Off by default."})]})]}):null,Q?e.jsxs("div",{className:"grid gap-2",children:[e.jsx(b,{children:"Conversation starters"}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Up to three prompts offered on a new chat, on the web and in Slack. The message is sent as the user when tapped."}),y.map((n,h)=>e.jsxs("div",{className:"grid gap-2 sm:grid-cols-[12rem_1fr]",children:[e.jsx(O,{"aria-label":`Starter ${h+1} title`,placeholder:"Plan this week",maxLength:Ze,value:n.title,onChange:M=>G(y.map((A,U)=>U===h?{...A,title:M.target.value}:A)),disabled:f}),e.jsx(O,{"aria-label":`Starter ${h+1} message`,placeholder:"Plan this week's posts from what's trending",maxLength:es,value:n.message,onChange:M=>G(y.map((A,U)=>U===h?{...A,message:M.target.value}:A)),disabled:f})]},h))]}):null,W?e.jsxs("div",{className:"grid gap-2",children:[e.jsx(b,{children:"Models"}),e.jsx(Ke,{value:R,onChange:oe,disabled:f}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Ordered list; the first is the default. Only these models may be used — a request for anything else falls back to the first available one. Leave empty to use the org default."})]}):null,W?e.jsxs("div",{className:"grid gap-2",children:[e.jsx(b,{htmlFor:"agent-sandbox",children:"Run in sandbox"}),e.jsxs(Ue,{value:S,onValueChange:me,disabled:f,children:[e.jsx(Oe,{id:"agent-sandbox",className:"w-full",children:e.jsx(qe,{placeholder:"Built-in"})}),e.jsxs(Ve,{children:[e.jsx(Z,{value:"builtin",children:"Built-in (default)"}),(ge?.sandboxes??[]).map(n=>e.jsxs(Z,{value:n.id,children:[n.name," (",n.providerKind,")",n.connected?"":" — no credential"]},n.id))]})]}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Where this agent's commands execute. Built-in runs in-process; sandboxes run on a connected provider. Manage sandboxes under Connect › Runtime."})]}):null]}),fe?e.jsxs("div",{className:"mt-6 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[we?ue?e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row",children:[e.jsx(j,{type:"button",variant:"destructive",onClick:()=>void xe(),disabled:i.isPending,children:i.isPending?"Deleting...":"Delete agent"}),e.jsx(j,{type:"button",variant:"outline",onClick:()=>_(!1),disabled:i.isPending,children:"Cancel"})]}):e.jsx(j,{type:"button",variant:"outline",className:"text-destructive hover:text-destructive",onClick:()=>_(!0),disabled:i.isPending,children:"Delete agent"}):e.jsx("span",{}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row",children:[v?e.jsx(j,{type:"button",variant:"outline",onClick:v,disabled:z,children:"Cancel"}):null,e.jsx(j,{type:"submit",disabled:!d.canSubmit||!ve||z,children:o?l.isPending?"Creating...":"Create agent":m.isPending||P.isPending?"Saving...":"Save changes"})]})]}):null]})}export{ns as A};
|
|
2
|
-
//# sourceMappingURL=agent-editor-form-
|
|
1
|
+
import{ax as ye,ay as Ne,j as e,B as j,cX as Ce,et as Se,a$ as Me,Q as Ae,eE as ke,cF as H,dy as J,cT as Ie,h8 as Pe,h9 as Te,ha as Fe,hb as De,gj as Re,hc as Ee,bQ as _e,bR as $e,az as Le,r as K,bJ as $,f4 as Y,bU as Be,z as b,fN as L,I as O,T as ze,bp as Ue,bq as Oe,br as qe,bs as Ve,bt as Z}from"./index-9YuSRymd.js";import{b as Xe,s as Ge}from"./model-selector-CDrAjH31.js";function Qe(a){const t=a.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").replace(/-{2,}/g,"-");return(t?/^[a-z]/.test(t)&&t.length>=3?t:`agent-${t}`:"agent").slice(0,60).replace(/-+$/g,"")||"agent"}function We(a,t){const r=new Set(t),x=Qe(a);let v=x,u=2;for(;r.has(v);){const g=`-${u}`;v=`${x.slice(0,Math.max(1,60-g.length)).replace(/-+$/g,"")||"agent"}${g}`,u+=1}return v}const He="__unresolved__";function ee(a){return a.endsWith(`/${He}`)}function se(a){const t=a.indexOf("/");return t===-1?{slug:a,model:""}:{slug:a.slice(0,t),model:a.slice(t+1)}}function Je(a,t){const{slug:r,model:x}=se(a);return{provider:t.find(g=>g.value===a)?.provider??t.find(g=>se(g.value).slug===r)?.provider??r,model:x}}function Ke({value:a,onChange:t,disabled:r}){const{data:x=[]}=ye(),{data:v=[]}=Ne(),u=Xe(x,v),g=(s,c)=>{const l=s+c;if(l<0||l>=a.length)return;const m=[...a];[m[s],m[l]]=[m[l],m[s]],t(m)},k=s=>{t(a.filter((c,l)=>l!==s))},I=s=>{a.includes(s)||t([...a,s])},o=u.filter(s=>!a.includes(s.value)&&!ee(s.value));return e.jsxs("div",{className:"grid gap-2",children:[a.length===0?e.jsx("p",{className:"rounded-lg border border-dashed bg-muted/20 px-3 py-4 text-center text-[11px] text-muted-foreground",children:"No models pinned — this agent uses the org default."}):e.jsx("ul",{className:"grid gap-1.5",children:a.map((s,c)=>{const l=ee(s),{provider:m,model:i}=Je(s,u);return e.jsxs("li",{className:Ae("flex items-center gap-2 rounded-lg border bg-muted/20 px-3 py-2",l&&"opacity-60"),children:[e.jsxs("div",{className:"grid min-w-0 flex-1 gap-0.5",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"truncate text-sm",children:m}),c===0?e.jsx("span",{className:"shrink-0 rounded bg-primary/10 px-1.5 py-0.5 text-[10px] font-medium text-primary",children:"Default"}):null]}),e.jsx("span",{className:"truncate text-[11px] text-muted-foreground",children:l?"no model selected":i})]}),e.jsxs("div",{className:"flex shrink-0 items-center gap-0.5",children:[e.jsx(j,{type:"button",variant:"ghost",size:"icon",className:"h-7 w-7","aria-label":"Move up",disabled:r||c===0,onClick:()=>g(c,-1),children:e.jsx(Ce,{className:"h-4 w-4"})}),e.jsx(j,{type:"button",variant:"ghost",size:"icon",className:"h-7 w-7","aria-label":"Move down",disabled:r||c===a.length-1,onClick:()=>g(c,1),children:e.jsx(Se,{className:"h-4 w-4"})}),e.jsx(j,{type:"button",variant:"ghost",size:"icon",className:"h-7 w-7 text-destructive hover:text-destructive","aria-label":"Remove model",disabled:r,onClick:()=>k(c),children:e.jsx(Me,{className:"h-4 w-4"})})]})]},s)})}),e.jsx(ke,{contentClassName:"w-[--radix-popover-trigger-width] min-w-[280px]",searchPlaceholder:"Search or type a model ref…",emptyText:"Type a full provider/model ref to use it.",trigger:s=>e.jsxs(j,{type:"button",variant:"outline",role:"combobox","aria-expanded":s,disabled:r,className:"w-full justify-start font-normal text-muted-foreground",children:[e.jsx(Ie,{className:"mr-2 h-4 w-4 shrink-0"}),"Add model"]}),children:(s,c)=>{const l=c.trim(),m=Ge(l,u)&&!a.includes(l);return e.jsxs(e.Fragment,{children:[o.map(i=>e.jsxs(H,{value:`${i.provider} ${i.model} ${i.value}`,onSelect:()=>{I(i.value),s()},className:"cursor-pointer",children:[e.jsx(J,{className:"mr-2 h-4 w-4 opacity-0"}),e.jsxs("span",{className:"truncate",children:[i.provider," ",e.jsx("span",{className:"text-muted-foreground text-xs",children:i.model}),i.isDefault?e.jsx("span",{className:"ml-1.5 text-muted-foreground text-xs",children:"· org default"}):null]})]},i.value)),m?e.jsxs(H,{value:`__custom__ ${l}`,onSelect:()=>{I(l),s()},className:"cursor-pointer",children:[e.jsx(J,{className:"mr-2 h-4 w-4 opacity-0"}),e.jsxs("span",{children:["Use ",e.jsx("span",{className:"font-mono text-xs",children:l})]})]}):null]})}})]})}const Ye=3,Ze=72,es=2e3;function te(a){return Array.from({length:Ye},(t,r)=>a?.[r]??{title:"",message:""})}function ae(a){return a.map(({title:t,message:r})=>({title:t.trim(),message:r.trim()})).filter(({title:t,message:r})=>t&&r)}function ns({mode:a,section:t="identity",existingAgentIds:r=[],onCreated:x,onCancel:v,onDone:u,reviewMode:g="none",reviewProposal:k=null,reviewControlsDisabled:I=!1}){const o=a.kind==="create",s=a.kind==="edit"?a.agent:null,c=!o&&t!=="platforms"&&t!=="skills"&&!!s,l=Pe(),m=Te(s?.agentId??""),i=Fe(s?.agentId??""),P=De(s?.agentId??""),{data:p,isLoading:q}=Re(s?.agentId,{enabled:c}),V=!o&&g==="active"?k:null,B=V?Ee(V.proposal):void 0,N=p,X=s?.agentId??"create",d=_e(X,{name:B?.name??s?.name??"",description:B?.description??s?.description??"",identityMd:B?.identityMd??p?.identityMd??"",soulMd:p?.soulMd??"",userMd:p?.userMd??"",models:N?.models??N?.settings?.models??[],showToolCalls:N?.showToolCalls??N?.settings?.showToolCalls??!1,sandboxId:N?.sandboxId??N?.settings?.sandboxId??"builtin",starters:te(p?.starters)}),[w,ne]=d.field("name"),[C,le]=d.field("description"),[T,re]=d.field("identityMd"),[F,ie]=d.field("soulMd"),[D,de]=d.field("userMd"),[R,oe]=d.field("models"),[E,ce]=d.field("showToolCalls"),[S,me]=d.field("sandboxId"),[y,G]=d.field("starters"),[ue,_]=$e(X,!1),{data:ge}=Le({enabled:t==="models"&&!o}),he=K.useCallback(async n=>{if(n.preventDefault(),!!d.canSubmit){if(o){const h=await l.mutateAsync({agentId:We(w,r),name:w.trim(),description:C.trim()||void 0});x?await x(h.agentId):u?.();return}if(s){if(!p){$.error("Still loading agent settings — try again in a moment");return}if(y.some(({title:h,message:M})=>!!h.trim()!=!!M.trim())){$.error("Add both a title and a message for each conversation starter");return}try{await Promise.all([m.mutateAsync({name:w.trim()||s.name,description:C.trim()||void 0}),P.mutateAsync({identityMd:T.trim(),soulMd:F.trim(),userMd:D.trim(),models:R,authProfiles:p.authProfiles??[],skillsConfig:p.skillsConfig,showToolCalls:E,sandboxId:S==="builtin"?void 0:S,starters:ae(y)})]),d.accept(d.values,{name:w.trim()||s.name,description:C.trim()||s.description||"",identityMd:T.trim(),soulMd:F.trim(),userMd:D.trim(),models:R,showToolCalls:E,sandboxId:S,starters:te(ae(y))}),$.success("Agent saved"),u?.()}catch(h){$.error(h instanceof Error?h.message:"Failed to save agent")}}}},[p,l,C,d.accept,d.values,d.canSubmit,S,r,T,o,R,w,x,u,s,E,F,y,m,P,D]),xe=K.useCallback(async()=>{s&&(await i.mutateAsync(),_(!1),u?.())},[i,u,s,_]),z=l.isPending||m.isPending||i.isPending||P.isPending,pe=o||!!p;if(c&&q)return e.jsx(Y,{rows:6});const f=z||I,fe=g==="none"||g==="gone",ve=w.trim().length>0&&pe,be=o||t==="settings",je=!o&&(t==="identity"||t==="settings"),we=!o&&t==="settings",Q=!o&&t==="settings",W=!o&&t==="models";return e.jsxs("form",{onSubmit:he,className:"flex min-h-0 flex-col",children:[e.jsx(Be,{visible:d.hasConflict,onReload:d.reset}),e.jsxs("div",{className:"grid content-start gap-4 py-2",children:[je?q?e.jsx(Y,{rows:4}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(b,{htmlFor:"identity-md",children:"Identity"}),e.jsx(L,{id:"identity-md",rows:6,value:T,onChange:n=>re(n.target.value),disabled:f,placeholder:"You are a market intelligence agent. Track competitors, analyze launches and signals, and surface concise, decision-ready insights."})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(b,{htmlFor:"soul-md",children:"Soul"}),e.jsx(L,{id:"soul-md",rows:6,value:F,onChange:n=>ie(n.target.value),disabled:f,placeholder:"Be rigorous, skeptical of weak signals, and calm under ambiguity. Prefer crisp summaries, explicit evidence, and clear confidence levels."})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(b,{htmlFor:"user-md",children:"User prompt"}),e.jsx(L,{id:"user-md",rows:6,value:D,onChange:n=>de(n.target.value),disabled:f,placeholder:"Monitor the market for notable competitor moves, pricing changes, launches, partnerships, and customer sentiment shifts. Summarize what changed, why it matters, and what to watch next."})]})]}):null,be?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(b,{htmlFor:"agent-name",children:["Name ",e.jsx("span",{className:"ml-1 text-destructive",children:"*"})]}),e.jsx(O,{id:"agent-name",placeholder:"Support Bot",value:w,onChange:n=>ne(n.target.value),disabled:f,required:!0}),o?e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"The agent ID will be generated automatically from the name."}):null]}),o?null:e.jsxs("div",{className:"grid gap-2",children:[e.jsx(b,{htmlFor:"agent-description",children:"Description"}),e.jsx(L,{id:"agent-description",placeholder:"Handles customer support and triage across channels.",value:C,onChange:n=>le(n.target.value),disabled:f,rows:3})]})]}):null,Q?e.jsxs("div",{className:"flex items-start gap-3 rounded-lg border bg-muted/20 p-3",children:[e.jsx(ze,{id:"show-tool-calls",checked:E,onCheckedChange:n=>ce(n===!0),disabled:f,className:"mt-0.5"}),e.jsxs("div",{className:"grid gap-0.5",children:[e.jsx(b,{htmlFor:"show-tool-calls",className:"cursor-pointer",children:"Show tool calls in chat"}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Render the agent's tool invocations (name, arguments, and result) as cards in the web chat. Off by default."})]})]}):null,Q?e.jsxs("div",{className:"grid gap-2",children:[e.jsx(b,{children:"Conversation starters"}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Up to three prompts offered on a new chat, on the web and in Slack. The message is sent as the user when tapped."}),y.map((n,h)=>e.jsxs("div",{className:"grid gap-2 sm:grid-cols-[12rem_1fr]",children:[e.jsx(O,{"aria-label":`Starter ${h+1} title`,placeholder:"Plan this week",maxLength:Ze,value:n.title,onChange:M=>G(y.map((A,U)=>U===h?{...A,title:M.target.value}:A)),disabled:f}),e.jsx(O,{"aria-label":`Starter ${h+1} message`,placeholder:"Plan this week's posts from what's trending",maxLength:es,value:n.message,onChange:M=>G(y.map((A,U)=>U===h?{...A,message:M.target.value}:A)),disabled:f})]},h))]}):null,W?e.jsxs("div",{className:"grid gap-2",children:[e.jsx(b,{children:"Models"}),e.jsx(Ke,{value:R,onChange:oe,disabled:f}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Ordered list; the first is the default. Only these models may be used — a request for anything else falls back to the first available one. Leave empty to use the org default."})]}):null,W?e.jsxs("div",{className:"grid gap-2",children:[e.jsx(b,{htmlFor:"agent-sandbox",children:"Run in sandbox"}),e.jsxs(Ue,{value:S,onValueChange:me,disabled:f,children:[e.jsx(Oe,{id:"agent-sandbox",className:"w-full",children:e.jsx(qe,{placeholder:"Built-in"})}),e.jsxs(Ve,{children:[e.jsx(Z,{value:"builtin",children:"Built-in (default)"}),(ge?.sandboxes??[]).map(n=>e.jsxs(Z,{value:n.id,children:[n.name," (",n.providerKind,")",n.connected?"":" — no credential"]},n.id))]})]}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Where this agent's commands execute. Built-in runs in-process; sandboxes run on a connected provider. Manage sandboxes under Connect › Runtime."})]}):null]}),fe?e.jsxs("div",{className:"mt-6 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[we?ue?e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row",children:[e.jsx(j,{type:"button",variant:"destructive",onClick:()=>void xe(),disabled:i.isPending,children:i.isPending?"Deleting...":"Delete agent"}),e.jsx(j,{type:"button",variant:"outline",onClick:()=>_(!1),disabled:i.isPending,children:"Cancel"})]}):e.jsx(j,{type:"button",variant:"outline",className:"text-destructive hover:text-destructive",onClick:()=>_(!0),disabled:i.isPending,children:"Delete agent"}):e.jsx("span",{}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row",children:[v?e.jsx(j,{type:"button",variant:"outline",onClick:v,disabled:z,children:"Cancel"}):null,e.jsx(j,{type:"submit",disabled:!d.canSubmit||!ve||z,children:o?l.isPending?"Creating...":"Create agent":m.isPending||P.isPending?"Saving...":"Save changes"})]})]}):null]})}export{ns as A};
|
|
2
|
+
//# sourceMappingURL=agent-editor-form-DsSoeQeF.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as N,j as e,z as w,I as S,bp as K,bq as X,br as Y,bs as ee,bt as ae,fN as te,B as k,o as P,gj as A,iU as L,iV as O,hb as F,f4 as se,bJ as j,gp as J,bz as ne,bM as re,aR as D,gr as ie,ep as oe,eq as le,er as U,es as E,ev as de,ew as $,P as ue,ir as ce,bB as q,cT as me,Q as R,iS as ge}from"./index-DYCqXaMf.js";import{M as he}from"./model-selector-TQcA93xm.js";import{a as xe,A as pe}from"./agent-subpage-shell-BBJoyTuC.js";import{f as be}from"./agent-loading-shells-De_2d8Lr.js";import{A as je}from"./agent-card-controls-Be1Okb2C.js";const fe=[{value:"input",label:"Input",hint:"the user message, before the agent runs"},{value:"output",label:"Output",hint:"the agent's reply, before the user sees it"},{value:"pre-tool",label:"Pre-tool",hint:"a tool call, before it executes"},{value:"egress",label:"Egress",hint:"an outbound request to a judged domain"}];function I({initial:a,judgeModelDefault:t,submitLabel:n,submitting:s,onSubmit:o,onCancel:r}){const[i,d]=N.useState(a?.name??""),[h,f]=N.useState(a?.stage??"input"),[p,y]=N.useState(a?.policy??""),[b,C]=N.useState(a?.model??""),[x,u]=N.useState((a?.tools??[]).join(", ")),[l,m]=N.useState((a?.domains??[]).join(", ")),g=a?.kind,v=g==="require-tool",Q=c=>{c.preventDefault();const M=x.split(",").map(T=>T.trim()).filter(Boolean);o({name:i,stage:h,...g?{kind:g}:{},policy:p,model:b.trim()||void 0,tools:(v||h==="pre-tool")&&M.length>0?M:void 0,domains:h==="egress"&&l.trim()?l.split(",").map(T=>T.trim()).filter(Boolean):void 0,enabled:a?.enabled??!0})};return e.jsxs("form",{onSubmit:Q,className:"space-y-5",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(w,{htmlFor:"guardrail-name",children:["Name ",e.jsx("span",{className:"ml-1 text-destructive",children:"*"})]}),e.jsx(S,{id:"guardrail-name",value:i,onChange:c=>d(c.target.value),placeholder:"no-competitor-mentions",disabled:s}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Shown in the list and on every trip. Must be unique."})]}),v?null:e.jsxs("div",{className:"grid gap-2",children:[e.jsx(w,{htmlFor:"guardrail-stage",children:"Stage"}),e.jsxs(K,{value:h,onValueChange:c=>f(c),disabled:s,children:[e.jsx(X,{id:"guardrail-stage",children:e.jsx(Y,{})}),e.jsx(ee,{children:fe.map(c=>e.jsxs(ae,{value:c.value,children:[c.label," — ",c.hint]},c.value))})]})]}),v?e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(w,{htmlFor:"guardrail-required-tools",children:["Required tools ",e.jsx("span",{className:"ml-1 text-destructive",children:"*"})]}),e.jsx(S,{id:"guardrail-required-tools",value:x,onChange:c=>u(c.target.value),placeholder:"suggest_actions",disabled:s}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Comma-separated. The turn trips if the agent finishes without calling every one of these. No judge model runs — this is a lookup against the tools the turn actually used."})]}):null,v?null:e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(w,{htmlFor:"guardrail-policy",children:["Policy ",e.jsx("span",{className:"ml-1 text-destructive",children:"*"})]}),e.jsx(te,{id:"guardrail-policy",rows:5,value:p,onChange:c=>y(c.target.value),placeholder:"Deny any response that names a competitor (Acme, Globex) or quotes their pricing.",disabled:s}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"A judge model reads this and the text at the chosen stage, then allows or denies. Write it as an instruction to a reviewer."})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(w,{htmlFor:"guardrail-model",children:["Judge model",t?null:e.jsx("span",{className:"ml-1 text-destructive",children:"*"})]}),e.jsx(he,{value:b,onChange:C,placeholder:t?`Default (${t})`:"Select a model",disabled:s}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:t?"Optional. Leave blank to use the gateway's default judge model.":"Required: the gateway has no default judge model (EGRESS_JUDGE_MODEL is unset)."})]})]}),!v&&h==="pre-tool"?e.jsxs("div",{className:"grid gap-2",children:[e.jsx(w,{htmlFor:"guardrail-tools",children:"Tool scope"}),e.jsx(S,{id:"guardrail-tools",value:x,onChange:c=>u(c.target.value),placeholder:"github.delete_repo, fs.delete",disabled:s}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Optional, comma-separated. Leave blank to judge every tool call."})]}):null,h==="egress"?e.jsxs("div",{className:"grid gap-2",children:[e.jsx(w,{htmlFor:"guardrail-domains",children:"Domains"}),e.jsx(S,{id:"guardrail-domains",value:l,onChange:c=>m(c.target.value),placeholder:"api.github.com, .slack.com",disabled:s}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Comma-separated hostnames this judge gates — exact (api.github.com) or wildcard (.slack.com). Leave blank to route nothing."})]}):null,e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:justify-end",children:[r?e.jsx(k,{type:"button",variant:"outline",onClick:r,disabled:s,children:"Cancel"}):null,e.jsx(k,{type:"submit",disabled:s,children:s?"Saving…":n})]})]})}function z(a){return a.kind==="require-tool"}function H(a,t,n,s,o){const r=a.name.trim();return r?/^[a-zA-Z0-9][a-zA-Z0-9 _-]*$/.test(r)?n.includes(r)?`"${r}" is a built-in guardrail name — pick another.`:t.some(d=>d.name===r&&d.name!==o)?`A custom guardrail named "${r}" already exists.`:z(a)?a.stage!=="output"?"A required-tool guardrail only runs at the output stage.":a.tools?.some(d=>d.trim())?null:"List at least one tool that must be used.":a.policy.trim()?!s&&!a.model?.trim()?"Judge model is required — the gateway has no default (EGRESS_JUDGE_MODEL is unset).":null:"Policy is required.":"Name may use letters, numbers, spaces, hyphens, and underscores.":"Name is required."}function V(a){const t=z(a),s=(t||a.stage==="pre-tool")&&a.tools&&a.tools.length>0?a.tools.map(d=>d.trim()).filter(Boolean):void 0,o=a.stage==="egress"&&a.domains&&a.domains.length>0?a.domains.map(d=>d.trim()).filter(Boolean):void 0,r=a.model?.trim()||void 0,i=a.policy.trim();return{name:a.name.trim(),enabled:a.enabled,stage:a.stage,...t?{kind:"require-tool"}:{},...t?i?{policy:i}:{}:{policy:i},...r?{model:r}:{},...s&&s.length>0?{tools:s}:{},...o&&o.length>0?{domains:o}:{}}}function ve(a,t){return[...a,V(t)]}function Ne(a,t,n){return a.map(s=>s.name===t?V(n):s)}function ye(a,t){return a.filter(n=>n.name!==t)}function Ce(a,t,n){return a.map(s=>s.name===t?{...s,enabled:n}:s)}function we({owner:a,agentId:t}){const n=P(),{data:s,isLoading:o}=A(t),{data:r,isLoading:i}=L(t),{data:d=null,isLoading:h}=O(t),f=o||i||h,p=F(t),y=s?.guardrailsInline??[],b=(r??[]).map(u=>u.name),C=async u=>{if(!s){j.error("Still loading agent settings — try again in a moment");return}const l=H(u,y,b,d);if(l){j.error(l);return}try{await p.mutateAsync({guardrailsInline:ve(y,u)}),j.success("Guardrail created"),n({to:"/$owner/agents/$agentId/guardrails",params:{owner:a,agentId:t}})}catch(m){j.error(m instanceof Error?m.message:"Failed to create guardrail")}},x=()=>void n({to:"/$owner/agents/$agentId/guardrails",params:{owner:a,agentId:t}});return e.jsxs("div",{className:"space-y-6",children:[e.jsx(xe,{title:"New custom guardrail",description:"A custom guardrail judges text at one stage against a policy you write.",backLabel:"Guardrails",onBack:x}),f?e.jsx(se,{rows:4}):e.jsx(I,{judgeModelDefault:d,submitLabel:"Create guardrail",submitting:p.isPending,onSubmit:C,onCancel:x})]})}function B(a,t){const n=new Set(a?.guardrails??[]),s=new Set(t.map(i=>i.name)),o=t.map(i=>({name:i.name,stages:i.stages,description:i.description,enabled:n.has(i.name),unknown:!1})),r=(a?.guardrails??[]).filter(i=>!s.has(i)).map(i=>({name:i,stages:[],enabled:!0,unknown:!0}));return[...o,...r]}function ke(a){return a.filter(t=>t.enabled||t.unknown).map(t=>t.name)}function Se(a,t,n){return ke(a.map(s=>s.name===t&&!s.unknown?{...s,enabled:n}:s))}const G={input:"Input",output:"Output","pre-tool":"Pre-tool",egress:"Egress"};function Ge(a){const t=new Date(a);return Number.isNaN(t.getTime())?a:ce(t,{addSuffix:!0})}function Ae({owner:a,agentId:t,name:n}){const{data:s}=A(t),{data:o}=L(t),r=N.useMemo(()=>B(s,o??[]).find(d=>d.name===n)??null,[s,o,n]),i=(s?.guardrailsInline??[]).find(d=>d.name===n);return i?e.jsx(Te,{owner:a,agentId:t,guardrail:i}):r?e.jsx(Le,{agentId:t,name:n,row:r}):e.jsx("p",{className:"text-sm text-muted-foreground",children:"Guardrail not found."})}function Le({agentId:a,name:t,row:n}){return e.jsxs("div",{className:"space-y-8",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:n.description??(n.stages.length>0?`Built-in. Short-circuits this agent's ${n.stages.map(s=>G[s].toLowerCase()).join(", ")} stage${n.stages.length>1?"s":""} when it matches.`:"Configured out of band — toggling is managed via lobu apply.")}),e.jsx(W,{agentId:a,guardrail:t})]})}function Te({owner:a,agentId:t,guardrail:n}){const s=P(),{data:o}=A(t),{data:r}=L(t),{data:i=null}=O(t),d=F(t),[h,f]=N.useState(!1),p=o?.guardrailsInline??[],y=(r??[]).map(u=>u.name),b=async(u,l)=>{if(!o)return j.error("Still loading agent settings — try again in a moment"),!1;try{return await d.mutateAsync({guardrailsInline:u}),j.success(l),!0}catch(m){return j.error(m instanceof Error?m.message:"Failed to save guardrail"),!1}},C=async u=>{const l=H(u,p,y,i,n.name);if(l){j.error(l);return}await b(Ne(p,n.name,u),"Guardrail saved")&&u.name.trim()!==n.name&&s({to:"/$owner/agents/$agentId/guardrails/$name",params:{owner:a,agentId:t,name:encodeURIComponent(u.name.trim())}})},x=async()=>{await b(ye(p,n.name),"Guardrail deleted")&&s({to:"/$owner/agents/$agentId/guardrails",params:{owner:a,agentId:t}})};return e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-sm font-medium",children:n.kind==="require-tool"?"Required tools":"Policy"}),e.jsx(I,{initial:n,judgeModelDefault:i,submitLabel:"Save changes",submitting:d.isPending,onSubmit:C})]}),e.jsx("div",{className:"flex justify-end",children:h?e.jsxs("div",{className:"flex gap-2",children:[e.jsx(k,{type:"button",variant:"destructive",onClick:()=>void x(),disabled:d.isPending,children:"Delete guardrail"}),e.jsx(k,{type:"button",variant:"outline",onClick:()=>f(!1),disabled:d.isPending,children:"Cancel"})]}):e.jsxs(k,{type:"button",variant:"outline",className:"text-destructive hover:text-destructive",onClick:()=>f(!0),children:["Delete ",n.name]})}),e.jsx(W,{agentId:t,guardrail:n.name})]})}function W({agentId:a,guardrail:t}){const{data:n=[],isLoading:s,isError:o}=J(a,{guardrail:t});return e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-sm font-medium",children:"Recent catches"}),s?e.jsx(ne,{label:"catches",variant:"table",rows:4}):o?e.jsx(re,{label:"catches"}):n.length===0?e.jsx(D,{icon:ie,title:"No catches yet",description:"This guardrail hasn't short-circuited anything on this agent."}):e.jsx("div",{className:"overflow-hidden rounded-lg border",children:e.jsxs(oe,{children:[e.jsx(le,{children:e.jsxs(U,{children:[e.jsx(E,{className:"w-[180px]",children:"When"}),e.jsx(E,{className:"w-[120px]",children:"Stage"}),e.jsx(E,{children:"Reason"})]})}),e.jsx(de,{children:n.map(r=>e.jsxs(U,{children:[e.jsx($,{className:"text-xs text-muted-foreground",title:r.occurredAt,children:Ge(r.occurredAt)}),e.jsx($,{children:e.jsx(ue,{variant:"outline",className:"text-[10px]",children:G[r.stage]})}),e.jsx($,{className:"text-sm text-muted-foreground",children:r.reason??e.jsx("span",{className:"italic",children:"no reason recorded"})})]},r.id))})]})})]})}function Ee({description:a,action:t}){return e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[e.jsx("p",{className:"min-w-0 flex-1 text-center text-sm text-muted-foreground",children:a}),t?e.jsx("div",{className:"shrink-0",children:t}):null]})}function _(a,t){return a.get(t)??0}function $e(a,t,n){const s=a.map(r=>{const i=r.stages.map(d=>G[d]);return r.unknown&&i.push("Unknown"),{id:r.name,name:r.name,kind:"builtin",description:r.description,stages:r.stages,enabled:r.enabled,unknown:r.unknown,badges:i,tripCount:_(n,r.name)}}),o=t.map(r=>{const i=[G[r.stage],"Custom"];return{id:r.name,name:r.name,kind:"custom",description:r.policy,stages:[r.stage],enabled:r.enabled,unknown:!1,badges:i,tripCount:_(n,r.name)}});return[...s,...o]}function Re({owner:a,agentId:t,expandedName:n}){const s=P(),{data:o,isLoading:r}=A(t),{data:i,isLoading:d}=L(t),{data:h=[]}=J(t),f=F(t),p=async(l,m)=>{if(!o){j.error("Still loading agent settings — try again in a moment");return}try{if(l.kind==="custom")await f.mutateAsync({guardrailsInline:Ce(o.guardrailsInline??[],l.name,m)});else{const g=B(o,i??[]);await f.mutateAsync({guardrails:Se(g,l.name,m)})}j.success(m?"Guardrail enabled":"Guardrail disabled")}catch(g){j.error(g instanceof Error?g.message:"Failed to save guardrail")}},y=i===null,b=N.useMemo(()=>{const l=B(o,i??[]),m=o?.guardrailsInline??[],g=new Map;for(const v of h)g.set(v.guardrailName,(g.get(v.guardrailName)??0)+1);return $e(l,m,g)},[o,i,h]),C=l=>{if(l===n){s({to:"/$owner/agents/$agentId/guardrails",params:{owner:a,agentId:t}});return}s({to:"/$owner/agents/$agentId/guardrails/$name",params:{owner:a,agentId:t,name:encodeURIComponent(l)}})},x=()=>{s({to:"/$owner/agents/$agentId/guardrails/create",params:{owner:a,agentId:t}})},u=r||d;return!u&&b.length===0?e.jsx("div",{className:"space-y-6",children:y?e.jsx(D,{icon:q,title:"Guardrails catalog unavailable",description:"Guardrails will appear here once the gateway publishes its catalog.",actionLabel:"New guardrail",onAction:x}):e.jsx(D,{icon:q,title:"No guardrails yet",description:"Enable a built-in in lobu.toml or write a custom policy guardrail.",actionLabel:"New guardrail",onAction:x})}):e.jsxs("div",{className:"space-y-6",children:[e.jsx(Ee,{description:"Each guardrail short-circuits this agent's input, output, or tool-call stages. Built-ins are toggle-only; add a custom guardrail to judge messages against a policy you write.",action:u?void 0:e.jsxs(k,{type:"button",onClick:x,children:[e.jsx(me,{className:"mr-1.5 h-4 w-4"}),"New guardrail"]})}),u?e.jsx(be,{rows:3}):e.jsx("div",{className:"overflow-hidden rounded-lg border",children:b.map((l,m)=>{const g=l.name===n;return e.jsx(De,{card:l,expanded:g,isLast:m===b.length-1,onToggle:()=>C(l.name),onToggleEnabled:v=>void p(l,v),toggleDisabled:l.unknown||f.isPending,children:g?e.jsx(Ae,{owner:a,agentId:t,name:l.name}):null},l.id)})})]})}function De({card:a,expanded:t,isLast:n,onToggle:s,onToggleEnabled:o,toggleDisabled:r,children:i}){return e.jsxs("div",{className:R("bg-background",!n||t?"border-b":""),children:[e.jsxs("div",{className:"flex items-stretch gap-1 pr-3",children:[e.jsxs("button",{type:"button",onClick:s,"aria-expanded":t,className:R("flex min-w-0 flex-1 items-center gap-3 py-2.5 text-left text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground",!a.enabled&&!a.unknown&&!t&&"opacity-70"),children:[e.jsx(q,{className:"ml-2 h-4 w-4 shrink-0"}),e.jsxs("div",{className:"min-w-0 flex-1 space-y-1",children:[e.jsx("span",{className:R("truncate text-sm text-foreground",a.unknown&&"font-mono text-xs"),children:a.name}),a.kind==="custom"&&a.description?e.jsx("p",{className:"line-clamp-1 text-xs text-muted-foreground",children:a.description}):e.jsx("p",{className:"text-xs text-muted-foreground",children:a.tripCount>0?`${a.tripCount} recent ${a.tripCount===1?"catch":"catches"}`:"No recent catches"}),e.jsx(ge,{badges:a.badges})]})]}),e.jsx(je,{enabled:a.enabled,name:a.name,expanded:t,onToggleEnabled:o,toggleDisabled:r,onToggle:s})]}),t&&i?e.jsx("div",{className:"border-t border-border px-4 py-4",children:i}):null]})}function Z({owner:a,agentId:t,children:n,showBack:s}){return e.jsx(pe,{owner:a,agentId:t,showBack:s,backLabel:"Guardrails",backTo:"/$owner/agents/$agentId/guardrails",children:n})}function qe({owner:a,agentId:t,expandedName:n}){return e.jsx(Z,{owner:a,agentId:t,children:e.jsx(Re,{owner:a,agentId:t,expandedName:n})})}function _e({owner:a,agentId:t}){return e.jsx(Z,{owner:a,agentId:t,children:e.jsx(we,{owner:a,agentId:t})})}function Oe({owner:a,agentId:t,name:n}){return e.jsx(qe,{owner:a,agentId:t,expandedName:decodeURIComponent(n)})}export{qe as A,_e as a,Oe as b};
|
|
2
|
-
//# sourceMappingURL=agent-guardrails-route-
|
|
1
|
+
import{r as N,j as e,z as w,I as S,bp as K,bq as X,br as Y,bs as ee,bt as ae,fN as te,B as k,o as P,gj as A,iU as L,iV as O,hb as F,f4 as se,bJ as j,gp as J,bz as ne,bM as re,aR as D,gr as ie,ep as oe,eq as le,er as U,es as E,ev as de,ew as $,P as ue,ir as ce,bB as q,cT as me,Q as R,iS as ge}from"./index-9YuSRymd.js";import{M as he}from"./model-selector-CDrAjH31.js";import{a as xe,A as pe}from"./agent-subpage-shell-CZJvnjNC.js";import{f as be}from"./agent-loading-shells-B7v6Cffw.js";import{A as je}from"./agent-card-controls-CplnPhbv.js";const fe=[{value:"input",label:"Input",hint:"the user message, before the agent runs"},{value:"output",label:"Output",hint:"the agent's reply, before the user sees it"},{value:"pre-tool",label:"Pre-tool",hint:"a tool call, before it executes"},{value:"egress",label:"Egress",hint:"an outbound request to a judged domain"}];function I({initial:a,judgeModelDefault:t,submitLabel:n,submitting:s,onSubmit:o,onCancel:r}){const[i,d]=N.useState(a?.name??""),[h,f]=N.useState(a?.stage??"input"),[p,y]=N.useState(a?.policy??""),[b,C]=N.useState(a?.model??""),[x,u]=N.useState((a?.tools??[]).join(", ")),[l,m]=N.useState((a?.domains??[]).join(", ")),g=a?.kind,v=g==="require-tool",Q=c=>{c.preventDefault();const M=x.split(",").map(T=>T.trim()).filter(Boolean);o({name:i,stage:h,...g?{kind:g}:{},policy:p,model:b.trim()||void 0,tools:(v||h==="pre-tool")&&M.length>0?M:void 0,domains:h==="egress"&&l.trim()?l.split(",").map(T=>T.trim()).filter(Boolean):void 0,enabled:a?.enabled??!0})};return e.jsxs("form",{onSubmit:Q,className:"space-y-5",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(w,{htmlFor:"guardrail-name",children:["Name ",e.jsx("span",{className:"ml-1 text-destructive",children:"*"})]}),e.jsx(S,{id:"guardrail-name",value:i,onChange:c=>d(c.target.value),placeholder:"no-competitor-mentions",disabled:s}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Shown in the list and on every trip. Must be unique."})]}),v?null:e.jsxs("div",{className:"grid gap-2",children:[e.jsx(w,{htmlFor:"guardrail-stage",children:"Stage"}),e.jsxs(K,{value:h,onValueChange:c=>f(c),disabled:s,children:[e.jsx(X,{id:"guardrail-stage",children:e.jsx(Y,{})}),e.jsx(ee,{children:fe.map(c=>e.jsxs(ae,{value:c.value,children:[c.label," — ",c.hint]},c.value))})]})]}),v?e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(w,{htmlFor:"guardrail-required-tools",children:["Required tools ",e.jsx("span",{className:"ml-1 text-destructive",children:"*"})]}),e.jsx(S,{id:"guardrail-required-tools",value:x,onChange:c=>u(c.target.value),placeholder:"suggest_actions",disabled:s}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Comma-separated. The turn trips if the agent finishes without calling every one of these. No judge model runs — this is a lookup against the tools the turn actually used."})]}):null,v?null:e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(w,{htmlFor:"guardrail-policy",children:["Policy ",e.jsx("span",{className:"ml-1 text-destructive",children:"*"})]}),e.jsx(te,{id:"guardrail-policy",rows:5,value:p,onChange:c=>y(c.target.value),placeholder:"Deny any response that names a competitor (Acme, Globex) or quotes their pricing.",disabled:s}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"A judge model reads this and the text at the chosen stage, then allows or denies. Write it as an instruction to a reviewer."})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(w,{htmlFor:"guardrail-model",children:["Judge model",t?null:e.jsx("span",{className:"ml-1 text-destructive",children:"*"})]}),e.jsx(he,{value:b,onChange:C,placeholder:t?`Default (${t})`:"Select a model",disabled:s}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:t?"Optional. Leave blank to use the gateway's default judge model.":"Required: the gateway has no default judge model (EGRESS_JUDGE_MODEL is unset)."})]})]}),!v&&h==="pre-tool"?e.jsxs("div",{className:"grid gap-2",children:[e.jsx(w,{htmlFor:"guardrail-tools",children:"Tool scope"}),e.jsx(S,{id:"guardrail-tools",value:x,onChange:c=>u(c.target.value),placeholder:"github.delete_repo, fs.delete",disabled:s}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Optional, comma-separated. Leave blank to judge every tool call."})]}):null,h==="egress"?e.jsxs("div",{className:"grid gap-2",children:[e.jsx(w,{htmlFor:"guardrail-domains",children:"Domains"}),e.jsx(S,{id:"guardrail-domains",value:l,onChange:c=>m(c.target.value),placeholder:"api.github.com, .slack.com",disabled:s}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Comma-separated hostnames this judge gates — exact (api.github.com) or wildcard (.slack.com). Leave blank to route nothing."})]}):null,e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:justify-end",children:[r?e.jsx(k,{type:"button",variant:"outline",onClick:r,disabled:s,children:"Cancel"}):null,e.jsx(k,{type:"submit",disabled:s,children:s?"Saving…":n})]})]})}function z(a){return a.kind==="require-tool"}function H(a,t,n,s,o){const r=a.name.trim();return r?/^[a-zA-Z0-9][a-zA-Z0-9 _-]*$/.test(r)?n.includes(r)?`"${r}" is a built-in guardrail name — pick another.`:t.some(d=>d.name===r&&d.name!==o)?`A custom guardrail named "${r}" already exists.`:z(a)?a.stage!=="output"?"A required-tool guardrail only runs at the output stage.":a.tools?.some(d=>d.trim())?null:"List at least one tool that must be used.":a.policy.trim()?!s&&!a.model?.trim()?"Judge model is required — the gateway has no default (EGRESS_JUDGE_MODEL is unset).":null:"Policy is required.":"Name may use letters, numbers, spaces, hyphens, and underscores.":"Name is required."}function V(a){const t=z(a),s=(t||a.stage==="pre-tool")&&a.tools&&a.tools.length>0?a.tools.map(d=>d.trim()).filter(Boolean):void 0,o=a.stage==="egress"&&a.domains&&a.domains.length>0?a.domains.map(d=>d.trim()).filter(Boolean):void 0,r=a.model?.trim()||void 0,i=a.policy.trim();return{name:a.name.trim(),enabled:a.enabled,stage:a.stage,...t?{kind:"require-tool"}:{},...t?i?{policy:i}:{}:{policy:i},...r?{model:r}:{},...s&&s.length>0?{tools:s}:{},...o&&o.length>0?{domains:o}:{}}}function ve(a,t){return[...a,V(t)]}function Ne(a,t,n){return a.map(s=>s.name===t?V(n):s)}function ye(a,t){return a.filter(n=>n.name!==t)}function Ce(a,t,n){return a.map(s=>s.name===t?{...s,enabled:n}:s)}function we({owner:a,agentId:t}){const n=P(),{data:s,isLoading:o}=A(t),{data:r,isLoading:i}=L(t),{data:d=null,isLoading:h}=O(t),f=o||i||h,p=F(t),y=s?.guardrailsInline??[],b=(r??[]).map(u=>u.name),C=async u=>{if(!s){j.error("Still loading agent settings — try again in a moment");return}const l=H(u,y,b,d);if(l){j.error(l);return}try{await p.mutateAsync({guardrailsInline:ve(y,u)}),j.success("Guardrail created"),n({to:"/$owner/agents/$agentId/guardrails",params:{owner:a,agentId:t}})}catch(m){j.error(m instanceof Error?m.message:"Failed to create guardrail")}},x=()=>void n({to:"/$owner/agents/$agentId/guardrails",params:{owner:a,agentId:t}});return e.jsxs("div",{className:"space-y-6",children:[e.jsx(xe,{title:"New custom guardrail",description:"A custom guardrail judges text at one stage against a policy you write.",backLabel:"Guardrails",onBack:x}),f?e.jsx(se,{rows:4}):e.jsx(I,{judgeModelDefault:d,submitLabel:"Create guardrail",submitting:p.isPending,onSubmit:C,onCancel:x})]})}function B(a,t){const n=new Set(a?.guardrails??[]),s=new Set(t.map(i=>i.name)),o=t.map(i=>({name:i.name,stages:i.stages,description:i.description,enabled:n.has(i.name),unknown:!1})),r=(a?.guardrails??[]).filter(i=>!s.has(i)).map(i=>({name:i,stages:[],enabled:!0,unknown:!0}));return[...o,...r]}function ke(a){return a.filter(t=>t.enabled||t.unknown).map(t=>t.name)}function Se(a,t,n){return ke(a.map(s=>s.name===t&&!s.unknown?{...s,enabled:n}:s))}const G={input:"Input",output:"Output","pre-tool":"Pre-tool",egress:"Egress"};function Ge(a){const t=new Date(a);return Number.isNaN(t.getTime())?a:ce(t,{addSuffix:!0})}function Ae({owner:a,agentId:t,name:n}){const{data:s}=A(t),{data:o}=L(t),r=N.useMemo(()=>B(s,o??[]).find(d=>d.name===n)??null,[s,o,n]),i=(s?.guardrailsInline??[]).find(d=>d.name===n);return i?e.jsx(Te,{owner:a,agentId:t,guardrail:i}):r?e.jsx(Le,{agentId:t,name:n,row:r}):e.jsx("p",{className:"text-sm text-muted-foreground",children:"Guardrail not found."})}function Le({agentId:a,name:t,row:n}){return e.jsxs("div",{className:"space-y-8",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:n.description??(n.stages.length>0?`Built-in. Short-circuits this agent's ${n.stages.map(s=>G[s].toLowerCase()).join(", ")} stage${n.stages.length>1?"s":""} when it matches.`:"Configured out of band — toggling is managed via lobu apply.")}),e.jsx(W,{agentId:a,guardrail:t})]})}function Te({owner:a,agentId:t,guardrail:n}){const s=P(),{data:o}=A(t),{data:r}=L(t),{data:i=null}=O(t),d=F(t),[h,f]=N.useState(!1),p=o?.guardrailsInline??[],y=(r??[]).map(u=>u.name),b=async(u,l)=>{if(!o)return j.error("Still loading agent settings — try again in a moment"),!1;try{return await d.mutateAsync({guardrailsInline:u}),j.success(l),!0}catch(m){return j.error(m instanceof Error?m.message:"Failed to save guardrail"),!1}},C=async u=>{const l=H(u,p,y,i,n.name);if(l){j.error(l);return}await b(Ne(p,n.name,u),"Guardrail saved")&&u.name.trim()!==n.name&&s({to:"/$owner/agents/$agentId/guardrails/$name",params:{owner:a,agentId:t,name:encodeURIComponent(u.name.trim())}})},x=async()=>{await b(ye(p,n.name),"Guardrail deleted")&&s({to:"/$owner/agents/$agentId/guardrails",params:{owner:a,agentId:t}})};return e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-sm font-medium",children:n.kind==="require-tool"?"Required tools":"Policy"}),e.jsx(I,{initial:n,judgeModelDefault:i,submitLabel:"Save changes",submitting:d.isPending,onSubmit:C})]}),e.jsx("div",{className:"flex justify-end",children:h?e.jsxs("div",{className:"flex gap-2",children:[e.jsx(k,{type:"button",variant:"destructive",onClick:()=>void x(),disabled:d.isPending,children:"Delete guardrail"}),e.jsx(k,{type:"button",variant:"outline",onClick:()=>f(!1),disabled:d.isPending,children:"Cancel"})]}):e.jsxs(k,{type:"button",variant:"outline",className:"text-destructive hover:text-destructive",onClick:()=>f(!0),children:["Delete ",n.name]})}),e.jsx(W,{agentId:t,guardrail:n.name})]})}function W({agentId:a,guardrail:t}){const{data:n=[],isLoading:s,isError:o}=J(a,{guardrail:t});return e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-sm font-medium",children:"Recent catches"}),s?e.jsx(ne,{label:"catches",variant:"table",rows:4}):o?e.jsx(re,{label:"catches"}):n.length===0?e.jsx(D,{icon:ie,title:"No catches yet",description:"This guardrail hasn't short-circuited anything on this agent."}):e.jsx("div",{className:"overflow-hidden rounded-lg border",children:e.jsxs(oe,{children:[e.jsx(le,{children:e.jsxs(U,{children:[e.jsx(E,{className:"w-[180px]",children:"When"}),e.jsx(E,{className:"w-[120px]",children:"Stage"}),e.jsx(E,{children:"Reason"})]})}),e.jsx(de,{children:n.map(r=>e.jsxs(U,{children:[e.jsx($,{className:"text-xs text-muted-foreground",title:r.occurredAt,children:Ge(r.occurredAt)}),e.jsx($,{children:e.jsx(ue,{variant:"outline",className:"text-[10px]",children:G[r.stage]})}),e.jsx($,{className:"text-sm text-muted-foreground",children:r.reason??e.jsx("span",{className:"italic",children:"no reason recorded"})})]},r.id))})]})})]})}function Ee({description:a,action:t}){return e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[e.jsx("p",{className:"min-w-0 flex-1 text-center text-sm text-muted-foreground",children:a}),t?e.jsx("div",{className:"shrink-0",children:t}):null]})}function _(a,t){return a.get(t)??0}function $e(a,t,n){const s=a.map(r=>{const i=r.stages.map(d=>G[d]);return r.unknown&&i.push("Unknown"),{id:r.name,name:r.name,kind:"builtin",description:r.description,stages:r.stages,enabled:r.enabled,unknown:r.unknown,badges:i,tripCount:_(n,r.name)}}),o=t.map(r=>{const i=[G[r.stage],"Custom"];return{id:r.name,name:r.name,kind:"custom",description:r.policy,stages:[r.stage],enabled:r.enabled,unknown:!1,badges:i,tripCount:_(n,r.name)}});return[...s,...o]}function Re({owner:a,agentId:t,expandedName:n}){const s=P(),{data:o,isLoading:r}=A(t),{data:i,isLoading:d}=L(t),{data:h=[]}=J(t),f=F(t),p=async(l,m)=>{if(!o){j.error("Still loading agent settings — try again in a moment");return}try{if(l.kind==="custom")await f.mutateAsync({guardrailsInline:Ce(o.guardrailsInline??[],l.name,m)});else{const g=B(o,i??[]);await f.mutateAsync({guardrails:Se(g,l.name,m)})}j.success(m?"Guardrail enabled":"Guardrail disabled")}catch(g){j.error(g instanceof Error?g.message:"Failed to save guardrail")}},y=i===null,b=N.useMemo(()=>{const l=B(o,i??[]),m=o?.guardrailsInline??[],g=new Map;for(const v of h)g.set(v.guardrailName,(g.get(v.guardrailName)??0)+1);return $e(l,m,g)},[o,i,h]),C=l=>{if(l===n){s({to:"/$owner/agents/$agentId/guardrails",params:{owner:a,agentId:t}});return}s({to:"/$owner/agents/$agentId/guardrails/$name",params:{owner:a,agentId:t,name:encodeURIComponent(l)}})},x=()=>{s({to:"/$owner/agents/$agentId/guardrails/create",params:{owner:a,agentId:t}})},u=r||d;return!u&&b.length===0?e.jsx("div",{className:"space-y-6",children:y?e.jsx(D,{icon:q,title:"Guardrails catalog unavailable",description:"Guardrails will appear here once the gateway publishes its catalog.",actionLabel:"New guardrail",onAction:x}):e.jsx(D,{icon:q,title:"No guardrails yet",description:"Enable a built-in in lobu.toml or write a custom policy guardrail.",actionLabel:"New guardrail",onAction:x})}):e.jsxs("div",{className:"space-y-6",children:[e.jsx(Ee,{description:"Each guardrail short-circuits this agent's input, output, or tool-call stages. Built-ins are toggle-only; add a custom guardrail to judge messages against a policy you write.",action:u?void 0:e.jsxs(k,{type:"button",onClick:x,children:[e.jsx(me,{className:"mr-1.5 h-4 w-4"}),"New guardrail"]})}),u?e.jsx(be,{rows:3}):e.jsx("div",{className:"overflow-hidden rounded-lg border",children:b.map((l,m)=>{const g=l.name===n;return e.jsx(De,{card:l,expanded:g,isLast:m===b.length-1,onToggle:()=>C(l.name),onToggleEnabled:v=>void p(l,v),toggleDisabled:l.unknown||f.isPending,children:g?e.jsx(Ae,{owner:a,agentId:t,name:l.name}):null},l.id)})})]})}function De({card:a,expanded:t,isLast:n,onToggle:s,onToggleEnabled:o,toggleDisabled:r,children:i}){return e.jsxs("div",{className:R("bg-background",!n||t?"border-b":""),children:[e.jsxs("div",{className:"flex items-stretch gap-1 pr-3",children:[e.jsxs("button",{type:"button",onClick:s,"aria-expanded":t,className:R("flex min-w-0 flex-1 items-center gap-3 py-2.5 text-left text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground",!a.enabled&&!a.unknown&&!t&&"opacity-70"),children:[e.jsx(q,{className:"ml-2 h-4 w-4 shrink-0"}),e.jsxs("div",{className:"min-w-0 flex-1 space-y-1",children:[e.jsx("span",{className:R("truncate text-sm text-foreground",a.unknown&&"font-mono text-xs"),children:a.name}),a.kind==="custom"&&a.description?e.jsx("p",{className:"line-clamp-1 text-xs text-muted-foreground",children:a.description}):e.jsx("p",{className:"text-xs text-muted-foreground",children:a.tripCount>0?`${a.tripCount} recent ${a.tripCount===1?"catch":"catches"}`:"No recent catches"}),e.jsx(ge,{badges:a.badges})]})]}),e.jsx(je,{enabled:a.enabled,name:a.name,expanded:t,onToggleEnabled:o,toggleDisabled:r,onToggle:s})]}),t&&i?e.jsx("div",{className:"border-t border-border px-4 py-4",children:i}):null]})}function Z({owner:a,agentId:t,children:n,showBack:s}){return e.jsx(pe,{owner:a,agentId:t,showBack:s,backLabel:"Guardrails",backTo:"/$owner/agents/$agentId/guardrails",children:n})}function qe({owner:a,agentId:t,expandedName:n}){return e.jsx(Z,{owner:a,agentId:t,children:e.jsx(Re,{owner:a,agentId:t,expandedName:n})})}function _e({owner:a,agentId:t}){return e.jsx(Z,{owner:a,agentId:t,children:e.jsx(we,{owner:a,agentId:t})})}function Oe({owner:a,agentId:t,name:n}){return e.jsx(qe,{owner:a,agentId:t,expandedName:decodeURIComponent(n)})}export{qe as A,_e as a,Oe as b};
|
|
2
|
+
//# sourceMappingURL=agent-guardrails-route-TdvvIc_J.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as e,S as s,Q as n}from"./index-
|
|
2
|
-
//# sourceMappingURL=agent-loading-shells-
|
|
1
|
+
import{j as e,S as s,Q as n}from"./index-9YuSRymd.js";const r="mx-auto w-full max-w-3xl px-4",d="gap-4",i="ml-8 self-end max-w-[80%]",o="mr-8 max-w-[90%]",c="mx-auto w-full max-w-3xl shrink-0 border-t border-border/50 bg-transparent px-4 pb-4 pt-3";function f({rows:l=3}){return e.jsx("div",{className:"space-y-2",role:"status","aria-label":"Loading list",children:Array.from({length:l}).map((a,x)=>e.jsx(s,{className:"h-16 w-full rounded-lg"},x))})}function t({readOnly:l=!1}){return e.jsxs("div",{role:"status","aria-label":l?"Loading run history":"Loading chat",className:l?"flex min-h-[24rem] min-w-0 flex-1 flex-col":"flex min-h-0 flex-1 flex-col",children:[e.jsx("div",{className:l?"flex flex-1 flex-col overflow-hidden":"flex min-h-0 flex-1 flex-col overflow-hidden",children:e.jsxs("div",{className:n(r,"flex flex-1 flex-col overflow-hidden",d),children:[e.jsx("div",{className:i,children:e.jsx(s,{className:"h-12 w-48 rounded-lg"})}),e.jsx("div",{className:o,children:e.jsx(s,{className:n(l?"h-20":"h-16","w-64 rounded-lg")})}),e.jsx("div",{className:i,children:e.jsx(s,{className:"h-10 w-36 rounded-lg"})}),l?e.jsx("div",{className:o,children:e.jsx(s,{className:"h-16 w-52 rounded-lg"})}):null]})}),l?null:e.jsx("div",{className:c,children:e.jsx(s,{className:"h-24 w-full rounded-lg"})})]})}function h(){return e.jsx("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:e.jsx(t,{})})}function u(){return e.jsx("div",{className:"flex h-48 w-full items-end gap-2 px-2 pb-2",role:"status","aria-label":"Loading timeline",children:[40,65,45,80,55,70,50,85,60,75].map((l,a)=>e.jsx(s,{className:"flex-1 rounded-sm",style:{height:`${l}%`}},a))})}export{t as A,h as C,u as E,c as a,d as b,r as c,o as d,i as e,f};
|
|
2
|
+
//# sourceMappingURL=agent-loading-shells-B7v6Cffw.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as e,bC as D,Q as k,dK as K,dL as B,dN as R,fU as J,$ as V,bv as Y,bu as Z,bH as G,fV as ee,bI as P,bJ as L,bK as se,bD as ne,bL as te,bE as re,r as S,fW as ae,fX as ie,bz as le,bM as oe,L as w,fY as de,fZ as ce,cS as W,f_ as ue,f$ as me,g0 as ge,g1 as A,cF as F,X as fe,g2 as q,g3 as z,eE as xe,cT as he,g4 as be,g5 as ye,bP as pe,g6 as ve}from"./index-
|
|
2
|
-
//# sourceMappingURL=agent-permissions-matrix-
|
|
1
|
+
import{j as e,bC as D,Q as k,dK as K,dL as B,dN as R,fU as J,$ as V,bv as Y,bu as Z,bH as G,fV as ee,bI as P,bJ as L,bK as se,bD as ne,bL as te,bE as re,r as S,fW as ae,fX as ie,bz as le,bM as oe,L as w,fY as de,fZ as ce,cS as W,f_ as ue,f$ as me,g0 as ge,g1 as A,cF as F,X as fe,g2 as q,g3 as z,eE as xe,cT as he,g4 as be,g5 as ye,bP as pe,g6 as ve}from"./index-9YuSRymd.js";const je={auto:"bg-emerald-500/15 text-emerald-600 dark:text-emerald-400",approval:"bg-amber-500/15 text-amber-600 dark:text-amber-400",deny:"bg-red-500/15 text-red-600 dark:text-red-400"};function Ne({options:n,value:t,floor:o,onChange:a,disabled:i,ariaLabel:m,compact:u}){return e.jsx("div",{role:"radiogroup","aria-label":m,className:k("inline-flex shrink-0 items-stretch gap-0.5 rounded-lg border border-border bg-muted/40 p-0.5"),children:n.map(l=>{const b=J({option:l,floor:o}),h=l===t,g=b.disabled&&!h,y=D[l],f=e.jsx("button",{type:"button",role:"radio","aria-checked":h,disabled:i||g,onClick:()=>{!h&&!g&&!i&&a(l)},className:k("inline-flex shrink-0 items-center justify-center whitespace-nowrap font-medium transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",u?"min-w-[3rem] rounded-md px-2.5 py-1.5 text-xs leading-none":"min-w-[3.25rem] rounded-md px-3 py-1.5 text-sm leading-none",h?k(je[l],""):"text-muted-foreground hover:bg-background/60 hover:text-foreground",g&&"cursor-not-allowed opacity-40",i&&!g&&"cursor-not-allowed opacity-60"),children:y},l);return g&&b.reason?e.jsxs(K,{children:[e.jsx(B,{asChild:!0,children:e.jsx("span",{className:"inline-flex shrink-0",children:f})}),e.jsx(R,{children:b.reason})]},l):f})})}function M({children:n,controls:t}){return e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-x-4 gap-y-2 px-3 py-2",children:[e.jsx("div",{className:"min-w-40 flex-1 text-sm",children:n}),e.jsx("div",{className:"flex shrink-0 items-center gap-2",children:t})]})}const _e=[{resourceClass:"entity",title:"Entities",sub:"Defaults for every entity type."},{resourceClass:"agent_config",title:"Agents",sub:"Defaults for reading and managing agents."}];function Se(n,t,o,a,i=null){const m=q(n.floor,t,o,a,i),u=z(n.floor,t,o,a,i)?m:"auto";return(a!==null||i!==null)&&be(n.agent,t,o)?ye(u,A(n,t,o,null)):u}function ke({label:n,response:t,resourceClass:o,action:a,entityTypeSlug:i,targetAgentId:m=null,dimmed:u,pending:l,onSave:b}){const h=q(t.floor,o,a,i,m),g=z(t.floor,o,a,i,m),y=A(t,o,a,i,m),f=Se(t,o,a,i,m),v=pe(o,a),p=e.jsx("div",{className:k("inline-flex shrink-0",u&&"opacity-45"),children:e.jsx(Ne,{options:v,value:y,floor:f,disabled:l,compact:!0,ariaLabel:n,onChange:b})});return g?e.jsxs(K,{children:[e.jsx(B,{asChild:!0,children:e.jsx("span",{className:"inline-flex shrink-0",children:p})}),e.jsxs(R,{children:["Org floor ",D[h]," — can only go stricter"]})]}):p}function Ae(n,t){const o=i=>i.resource_class===t.resource_class&&(i.entity_type_slug??null)===(t.entity_type_slug??null)&&(i.operation_key??null)===(t.operation_key??null)&&(i.target_agent_id??null)===(t.target_agent_id??null),a=n.map(i=>o(i)?t:i);return a.some(o)?a:[...a,t]}function Ce(n,t,o,a,i,m){const u=ve(n,t,o,a);return u[i]=m,u}const $="font-medium text-foreground hover:text-primary hover:underline";function Ee({type:n}){return e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx(W,{icon:n.icon,className:"h-3.5 w-3.5 shrink-0"}),e.jsx("span",{className:"font-medium",children:n.name}),e.jsx("span",{className:"font-mono text-[10px] text-muted-foreground",children:n.slug})]})}function Q({label:n,disabled:t,hint:o,searchPlaceholder:a,emptyText:i,children:m}){return t?e.jsxs("div",{className:"px-3 py-1.5 text-xs text-muted-foreground",children:[n,o?` ${o}`:""]}):e.jsx(xe,{contentClassName:"w-[min(100vw-2rem,22rem)]",searchPlaceholder:a,emptyText:i,trigger:u=>e.jsxs("button",{type:"button","aria-expanded":u,className:"flex w-full items-center gap-1.5 px-3 py-1.5 text-left text-xs text-primary hover:bg-muted/50",children:[e.jsx(he,{className:"h-3 w-3"}),n]}),children:u=>m(u)})}function Te({pending:n,onClick:t,label:o}){return e.jsx("button",{type:"button",disabled:n,onClick:t,"aria-label":o,className:"rounded p-0.5 text-muted-foreground hover:bg-red-500/10 hover:text-red-600 disabled:opacity-50 dark:hover:text-red-400",children:e.jsx(fe,{className:"h-3 w-3"})})}function $e({owner:n,agentId:t,variant:o="agent"}){const a=o==="org-floor",i=V(),m=Y(n,t??"",{enabled:!a&&!!t}),u=Z(n,{enabled:a}),{data:l,isLoading:b,isError:h,error:g}=a?u:m,y=a?G(n):ee(n,t??""),f=P({mutationFn:r=>a?se(n,r):ne(n,t??"",r),onSuccess:r=>{i.setQueryData(y,c=>c&&{...c,agent:Ae(c.agent,r)}),i.invalidateQueries({queryKey:y}),a&&i.invalidateQueries({queryKey:["agent-permissions"]})},onError:r=>{L.error(r instanceof Error?r.message:"Failed to save permission")}}),v=P({mutationFn:r=>a?te(n,r):re(n,t??"",r),onSuccess:()=>{i.invalidateQueries({queryKey:y}),a&&i.invalidateQueries({queryKey:["agent-permissions"]})},onError:r=>{L.error(r instanceof Error?r.message:"Failed to remove override")}}),p=f.isPending||v.isPending,C=S.useMemo(()=>l?ae(l):[],[l]),E=S.useMemo(()=>{if(!l)return[];const r=new Set(C.map(c=>c.slug));return l.entity_types.filter(c=>!r.has(c.slug))},[l,C]),j=S.useMemo(()=>l?ie(l):[],[l]),N=S.useMemo(()=>{if(!l)return[];const r=new Set(j.map(c=>c.id));return l.agents.filter(c=>(a||c.id!==t)&&!r.has(c.id))},[l,j,t,a]);if(b)return e.jsx(le,{label:"permissions",variant:"cards",cards:2});if(h||!l)return e.jsx(oe,{label:g instanceof Error?g.message:"permissions"});const x=l,H=(r,c,T,_,s=null)=>{const d=Ce(x,r,c,s,T,_);f.mutate({resource_class:r,effects:d,entity_type_slug:c,target_agent_id:s})},I=x.entity_types.length===0?"— none yet":E.length===0?"— all covered":null,U=N.length===0&&j.length===0?"— no other agents":N.length===0?"— all covered":null;return e.jsxs("div",{className:"space-y-4",children:[a?null:e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Manage connector rules and agent restrictions in"," ",e.jsx(w,{to:"/$owner/settings/organization",params:{owner:n},search:{agent:t},hash:"policies",className:$,children:"Organization policies"}),"."]}),_e.map(r=>{const c=r.resourceClass==="entity",T=r.resourceClass==="agent_config",_=[{key:"default",label:"Default",name:"Default",entityTypeSlug:null,targetAgentId:null,owned:!1,diffs:0},...c?C.map(s=>({key:`entity:${s.slug}`,name:s.name,label:e.jsx(w,{to:"/$owner/entity-types/$slug",params:{owner:n,slug:s.slug},className:$,title:`Open ${s.name}`,children:e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx(W,{icon:s.icon,className:"h-3.5 w-3.5 shrink-0"}),s.name]})}),entityTypeSlug:s.slug,targetAgentId:null,owned:ce(x,s.slug),diffs:de(x,s.slug)})):j.map(s=>({key:`agent:${s.id}`,name:s.name,label:e.jsx(w,{to:"/$owner/agents/$agentId/settings",params:{owner:n,agentId:s.id},search:{run_id:void 0},className:$,title:`Open ${s.name}`,children:s.name}),entityTypeSlug:null,targetAgentId:s.id,owned:me(x,s.id),diffs:ue(x,s.id)}))];return e.jsxs("section",{className:"space-y-2",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h3",{className:"text-sm font-medium",children:r.title}),e.jsx("p",{className:"text-xs text-muted-foreground",children:r.sub})]}),e.jsxs("div",{className:"divide-y overflow-hidden rounded-lg border",children:[_.map(s=>e.jsxs("div",{className:"divide-y",children:[_.length>1&&e.jsx("div",{className:"bg-muted/30",children:e.jsx(M,{controls:s.owned?e.jsx(Te,{pending:p,label:`Remove ${s.name} exception`,onClick:()=>v.mutate({resource_class:r.resourceClass,entity_type_slug:s.entityTypeSlug,target_agent_id:s.targetAgentId})}):null,children:e.jsxs("div",{className:"flex items-center gap-2",children:[s.label,s.key!=="default"&&!s.owned?e.jsx("span",{className:"text-xs text-muted-foreground",children:"Organization minimum"}):s.diffs>0?e.jsxs("span",{className:"text-xs text-muted-foreground",children:[s.diffs," ",s.diffs===1?"change":"changes"]}):null]})})}),e.jsx("div",{className:"divide-y",children:ge[r.resourceClass].filter(d=>!s.targetAgentId||d!=="create").map(d=>{const O=`${d.charAt(0).toUpperCase()+d.slice(1)} ${c?"entities":"agents"}`;return e.jsx(M,{controls:e.jsx(ke,{label:`${s.name}: ${O}`,response:x,resourceClass:r.resourceClass,action:d,entityTypeSlug:s.entityTypeSlug,targetAgentId:s.targetAgentId,dimmed:s.key!=="default"&&A(x,r.resourceClass,d,s.entityTypeSlug,s.targetAgentId)===A(x,r.resourceClass,d,null),pending:p,onSave:X=>H(r.resourceClass,s.entityTypeSlug,d,X,s.targetAgentId)}),children:O},d)})})]},s.key)),e.jsxs("div",{className:"border-t",children:[c?e.jsx(Q,{label:"Add type",disabled:p||E.length===0,hint:I,searchPlaceholder:"Search types…",emptyText:"No matching types.",children:s=>E.map(d=>e.jsx(F,{value:`${d.name} ${d.slug}`,onSelect:()=>{f.mutate({resource_class:"entity",effects:{},entity_type_slug:d.slug}),s()},className:"cursor-pointer",children:e.jsx(Ee,{type:d})},d.slug))}):null,T?e.jsx(Q,{label:"Add agent",disabled:p||N.length===0,hint:U,searchPlaceholder:"Search agents…",emptyText:"No matching agents.",children:s=>N.map(d=>e.jsxs(F,{value:`${d.name} ${d.id}`,onSelect:()=>{f.mutate({resource_class:"agent_config",effects:{},target_agent_id:d.id}),s()},className:"cursor-pointer",children:[e.jsx("span",{className:"font-medium",children:d.name}),e.jsx("span",{className:"ml-1.5 font-mono text-[10px] text-muted-foreground",children:d.id})]},d.id))}):null]})]})]},r.resourceClass)})]})}export{$e as A,Ne as P,M as a};
|
|
2
|
+
//# sourceMappingURL=agent-permissions-matrix-BkZu1LYE.js.map
|