@lobu/runtime-server 21.2.1 → 22.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/catalogs/automations.json +40 -13
- package/dist/catalogs/connectors.json +16601 -597
- package/dist/component.json +1 -1
- package/dist/connectors/README.md +7 -5
- package/dist/connectors/_google/actions.ts +270 -0
- package/dist/connectors/_google/discovery/calendar_v3.json +1 -0
- package/dist/connectors/_google/discovery/chat_v1.json +1 -0
- package/dist/connectors/_google/discovery/docs_v1.json +1 -0
- package/dist/connectors/_google/discovery/drive_v3.json +1 -0
- package/dist/connectors/_google/discovery/gmail_v1.json +1 -0
- package/dist/connectors/_google/discovery/people_v1.json +1 -0
- package/dist/connectors/_google/discovery/sheets_v4.json +1 -0
- package/dist/connectors/_google/discovery/tasks_v1.json +1 -0
- package/dist/connectors/_google/discovery/youtube_v3.json +1 -0
- package/dist/connectors/_google/discovery.ts +442 -0
- package/dist/connectors/_google/errors.ts +91 -0
- package/dist/connectors/_google/list-feed.ts +223 -0
- package/dist/connectors/_google/policies.ts +127 -0
- package/dist/connectors/agentid.ts +43 -0
- package/dist/connectors/chat-user-identity.ts +2 -1
- package/dist/connectors/github-automation-events.ts +9 -0
- package/dist/connectors/github-identity.ts +28 -3
- package/dist/connectors/github.ts +101 -59
- package/dist/connectors/google_calendar.ts +207 -719
- package/dist/connectors/google_drive.ts +16 -2
- package/dist/connectors/google_gmail.ts +51 -33
- package/dist/connectors/herdr.ts +406 -0
- package/dist/connectors/jira.ts +6 -6
- package/dist/connectors/linear.ts +7 -4
- package/dist/connectors/postgres.ts +27 -2
- package/dist/connectors/tiktok-inbox-page.js +230 -0
- package/dist/connectors/tiktok-web-page.js +211 -0
- package/dist/connectors/tiktok_web.ts +286 -0
- package/dist/connectors/whatsapp-web-adapter.js +228 -10
- package/dist/connectors/whatsapp-web-helpers.ts +47 -14
- package/dist/connectors/whatsapp-web-identity.ts +121 -0
- package/dist/connectors/whatsapp_web.ts +170 -29
- package/dist/connectors/x.ts +276 -136
- package/dist/db/migrations/20261005150000_retire_agent_tool_config.sql +31 -0
- package/dist/db/migrations/20261005173700_drop_retired_agent_tool_config.sql +29 -0
- package/dist/db/migrations/20261007010000_identity_association_guards.sql +242 -0
- package/dist/db/migrations/20261007010001_identity_association_indexes.sql +35 -0
- package/dist/db/migrations/20261007012000_connector_browser_requirement.sql +7 -0
- package/dist/db/migrations/20261009010000_identity_member_decision_indexes.sql +22 -0
- package/dist/db/migrations/20261009015900_retire_remaining_physical_merges.sql +196 -0
- package/dist/db/migrations/20261009020000_retire_physical_entity_merge.sql +82 -0
- package/dist/db/migrations/20261009030000_retire_physical_merge_indexes.sql +39 -0
- package/dist/db/migrations/20261009030001_drop_physical_entity_redirect.sql +62 -0
- package/dist/db/migrations/20261009040000_normalize_identity_decisions.sql +60 -0
- package/dist/db/migrations/20261010220000_notification_targets_user_event_order.sql +53 -0
- package/dist/db/migrations/20261010223000_device_workers_user_fresh_cover.sql +39 -0
- package/dist/db/migrations/20261010223001_runs_org_default_view.sql +41 -0
- package/dist/db/migrations/20261010223002_events_org_guidance.sql +42 -0
- package/dist/db/migrations/20261011002000_finish_product_eval_retirement.sql +37 -0
- package/dist/db/migrations/20261011160000_mcp_conversation_workspaces.sql +97 -0
- package/dist/db/migrations/20261013120000_events_live_org_effective_date.sql +42 -0
- package/dist/db/migrations/20261013150000_events_live_linked_org_ids_gin.sql +41 -0
- package/dist/db/migrations/20261014120000_clear_team_device_auto_pause.sql +34 -0
- package/dist/db/migrations/20261014150000_connector_webhook_event_type_backfill.sql +30 -0
- package/dist/db/migrations/20261014170000_retire_atlassian_mcp_webhook_refresh.sql +51 -0
- package/dist/db/migrations/20261015010000_connection_auth_profile_fk_set_null_column.sql +53 -0
- package/dist/db/migrations/20261015120000_personal_org_connector_auto_policy.sql +38 -0
- package/dist/db/migrations/preconditions/20261005150000_retire_agent_tool_config.sql +22 -0
- package/dist/db/migrations/preconditions/20261005173700_drop_retired_agent_tool_config.sql +13 -0
- package/dist/db/migrations/preconditions/20261009020000_retire_physical_entity_merge.sql +26 -0
- package/dist/db/migrations/preconditions/20261011002000_finish_product_eval_retirement.sql +14 -0
- package/dist/dependencies.bun.lock +135 -128
- package/dist/guest.bundle.js +131 -185
- package/dist/owletto/dist/assets/_-CEPl6gU4.js +3 -0
- package/dist/owletto/dist/assets/_-C_zNZben.js +2 -0
- package/dist/owletto/dist/assets/_-DtqBFgK5.js +1 -0
- package/dist/owletto/dist/assets/_agentId-CBC_SadO.js +2 -0
- package/dist/owletto/dist/assets/_agentId-QQW91cHX.js +2 -0
- package/dist/owletto/dist/assets/_automationId-YTTNksw6.js +2 -0
- package/dist/owletto/dist/assets/_connectorKey._connectionId-fK0h7RAp.js +2 -0
- package/dist/owletto/dist/assets/_connectorKey.index-C7TPS598.js +2 -0
- package/dist/owletto/dist/assets/_conversationId-CEhxlTIo.js +2 -0
- package/dist/owletto/dist/assets/_deploymentId-BQfYN1U2.js +2 -0
- package/dist/owletto/dist/assets/_eventId-Cl8GSdjg.js +2 -0
- package/dist/owletto/dist/assets/_name-t3oBJ6Zf.js +2 -0
- package/dist/owletto/dist/assets/_owner-cUtGHqSw.js +3 -0
- package/dist/owletto/dist/assets/_shape-bo2lMVCu.js +2 -0
- package/dist/owletto/dist/assets/_skillKey-Dwm4Q4wI.js +2 -0
- package/dist/owletto/dist/assets/_slug-CU1PuHB9.js +2 -0
- package/dist/owletto/dist/assets/_threadId-DtqBFgK5.js +1 -0
- package/dist/owletto/dist/assets/_viewKey-Bh6E_NxA.js +2 -0
- package/dist/owletto/dist/assets/_viewKey-D4jKl-Zf.js +2 -0
- package/dist/owletto/dist/assets/accept-invitation-D3OgJG4i.js +2 -0
- package/dist/owletto/dist/assets/activity-route-view-DQglkhXU.js +2 -0
- package/dist/owletto/dist/assets/agent-card-controls-DzRs4Ix9.js +2 -0
- package/dist/owletto/dist/assets/{agent-client-setup-list-BFtgRwe8.js → agent-client-setup-list-B2SvH7xD.js} +4 -3
- package/dist/owletto/dist/assets/agent-connect-pages-B6uKvT_X.js +2 -0
- package/dist/owletto/dist/assets/agent-editor-form-oUnIYHd7.js +2 -0
- package/dist/owletto/dist/assets/agent-guardrails-route-BaV1VpDh.js +2 -0
- package/dist/owletto/dist/assets/agent-loading-shells-CtZJM2Gc.js +2 -0
- package/dist/owletto/dist/assets/agent-permissions-matrix-Ds48KFK9.js +2 -0
- package/dist/owletto/dist/assets/{agent-skill-context-BAr2Dw3F.js → agent-skill-context-DPk5r08w.js} +2 -1
- package/dist/owletto/dist/assets/agent-skills-route-DYpB5H1J.js +2 -0
- package/dist/owletto/dist/assets/agent-subpage-shell-B3K_jPYR.js +2 -0
- package/dist/owletto/dist/assets/agent-thread-C8UaUTWc.js +6 -0
- package/dist/owletto/dist/assets/agents-F4mGI2oF.js +2 -0
- package/dist/owletto/dist/assets/agents-workbench-CMyk4PI7.js +2 -0
- package/dist/owletto/dist/assets/app-bridge-BCm4muqj.js +128 -0
- package/dist/owletto/dist/assets/app._appId-DH1Qutz6.js +2 -0
- package/dist/owletto/dist/assets/automation-detail-content-CEDNboId.js +2 -0
- package/dist/owletto/dist/assets/automations-F4mGI2oF.js +2 -0
- package/dist/owletto/dist/assets/{callback-CaRe2TOT.js → callback-CU-hb8JB.js} +2 -1
- package/dist/owletto/dist/assets/{card-CMmh2mzo.js → card-DIF8SF9b.js} +2 -1
- package/dist/owletto/dist/assets/claim-DELEa-gH.js +2 -0
- package/dist/owletto/dist/assets/client-rows-EJSKR6z1.js +1 -0
- package/dist/owletto/dist/assets/clients-CpG676mg.js +2 -0
- package/dist/owletto/dist/assets/code-editor-V27Z4o3P.js +16 -0
- package/dist/owletto/dist/assets/connect-B2YL6qIK.js +2 -0
- package/dist/owletto/dist/assets/connect._clientId-B6LDmDRV.js +2 -0
- package/dist/owletto/dist/assets/connected._clientId-D_HaKoI1.js +2 -0
- package/dist/owletto/dist/assets/connected._clientId.activity-DQWcUqKM.js +2 -0
- package/dist/owletto/dist/assets/connected._clientId.index-BC3R303A.js +2 -0
- package/dist/owletto/dist/assets/connection-DySpRE9x.js +2 -0
- package/dist/owletto/dist/assets/connection-feed-detail-C_D68j6d.js +2 -0
- package/dist/owletto/dist/assets/connection-label-BobuYiAG.js +1 -0
- package/dist/owletto/dist/assets/connections-browser-Cnv2iBbZ.js +2 -0
- package/dist/owletto/dist/assets/{connector-provenance-BjKiUhYE.js → connector-provenance-CNXtzYg5.js} +2 -1
- package/dist/owletto/dist/assets/connector-scope-lists-BKDetNDc.js +2 -0
- package/dist/owletto/dist/assets/{connectors-Baejya0T.js → connectors-BJnk1z_2.js} +2 -1
- package/dist/owletto/dist/assets/consent-BVzxrAO9.js +2 -0
- package/dist/owletto/dist/assets/conversations-table-DfZGICl7.js +2 -0
- package/dist/owletto/dist/assets/{core.esm-QA7BQgiK.js → core.esm-DiTpULFl.js} +2 -1
- package/dist/owletto/dist/assets/create-CUqO6Kfk.js +2 -0
- package/dist/owletto/dist/assets/create-JRFM8mMf.js +2 -0
- package/dist/owletto/dist/assets/create-automation-form-_4vUkrls.js +3 -0
- package/dist/owletto/dist/assets/create-iHcxV0xd.js +2 -0
- package/dist/owletto/dist/assets/create._connectorKey-CCYLEicg.js +2 -0
- package/dist/owletto/dist/assets/{cronstrue-2GHCtD7h.js → cronstrue-DPXl0qA2.js} +2 -1
- package/dist/owletto/dist/assets/deployments-DCQdFdwG.js +2 -0
- package/dist/owletto/dist/assets/{deployments-body-Bm2upStd.js → deployments-body-D6TAWs_6.js} +2 -1
- package/dist/owletto/dist/assets/deployments-ihkhK1zV.js +2 -0
- package/dist/owletto/dist/assets/device-CntqYW65.js +2 -0
- package/dist/owletto/dist/assets/device-pin-tombstone-Bz4JHHMK.js +2 -0
- package/dist/owletto/dist/assets/device._deviceId-D4plO3GM.js +2 -0
- package/dist/owletto/dist/assets/{entity-options-CrbS6K-i.js → entity-options-UJs64GdQ.js} +2 -1
- package/dist/owletto/dist/assets/entity-page-Djz6T50J.js +2 -0
- package/dist/owletto/dist/assets/entity-type-page-OznRag6A.js +2 -0
- package/dist/owletto/dist/assets/event-detail-04qOUGIP.js +2 -0
- package/dist/owletto/dist/assets/events-feed-fucGZSJR.js +2 -0
- package/dist/owletto/dist/assets/filter-editors-DCQgGLyR.js +2 -0
- package/dist/owletto/dist/assets/full-page-spinner-KpV2FS2u.js +2 -0
- package/dist/owletto/dist/assets/guardrails-molekzAF.js +2 -0
- package/dist/owletto/dist/assets/identity-BJcaG66g.js +2 -0
- package/dist/owletto/dist/assets/index-B04ON9Jv.js +2 -0
- package/dist/owletto/dist/assets/index-BEvyBdOU.js +2 -0
- package/dist/owletto/dist/assets/{index-Cf0GJoiG.js → index-BJXkc60S.js} +2 -1
- package/dist/owletto/dist/assets/index-BLEcy9-T.css +1 -0
- package/dist/owletto/dist/assets/index-BNh2cidi.js +2 -0
- package/dist/owletto/dist/assets/index-BOsK-K-2.js +2 -0
- package/dist/owletto/dist/assets/{index-DlepU3cY.js → index-BOzuAbvi.js} +2 -1
- package/dist/owletto/dist/assets/index-Bk1x7A67.js +2 -0
- package/dist/owletto/dist/assets/index-CDz3-ieP.js +1 -0
- package/dist/owletto/dist/assets/index-CFnx5huL.js +2 -0
- package/dist/owletto/dist/assets/index-D3s8rhG9.js +2 -0
- package/dist/owletto/dist/assets/index-DCdkwg9H.js +2 -0
- package/dist/owletto/dist/assets/index-Dbd1jusf.js +2 -0
- package/dist/owletto/dist/assets/index-DqZuqC08.js +2 -0
- package/dist/owletto/dist/assets/index-Dr-Xg_xO.js +2 -0
- package/dist/owletto/dist/assets/index-DtqBFgK5.js +1 -0
- package/dist/owletto/dist/assets/index-KPOvMVa-.js +2 -0
- package/dist/owletto/dist/assets/index-Vcq4gwWv.js +1 -0
- package/dist/owletto/dist/assets/index-_oPeVpL_.js +7950 -0
- package/dist/owletto/dist/assets/index-rrnUF981.js +1 -0
- package/dist/owletto/dist/assets/json-diff-D_Ym3Uku.js +4 -0
- package/dist/owletto/dist/assets/{list-skeleton-BtWn2eo2.js → list-skeleton-Bl0OS39L.js} +2 -1
- package/dist/owletto/dist/assets/login-QHdxqX-4.js +2 -0
- package/dist/owletto/dist/assets/logout-DUccApuZ.js +2 -0
- package/dist/owletto/dist/assets/member-scope-gate-CFbrq1by.js +2 -0
- package/dist/owletto/dist/assets/memory-browse-page-IrIXuZTF.js +103 -0
- package/dist/owletto/dist/assets/model-selector-CB1BDvlW.js +2 -0
- package/dist/owletto/dist/assets/models-DnMb3n-Z.js +2 -0
- package/dist/owletto/dist/assets/new-B5UsLiy6.js +2 -0
- package/dist/owletto/dist/assets/new-BWo8_Pms.js +2 -0
- package/dist/owletto/dist/assets/new-DpmDXmFI.js +2 -0
- package/dist/owletto/dist/assets/oauth-workspace-access-PGyTnW2K.js +2 -0
- package/dist/owletto/dist/assets/organization-BH8PYlVu.js +2 -0
- package/dist/owletto/dist/assets/peek-pane-content-B2AFNTzP.js +2 -0
- package/dist/owletto/dist/assets/{permissions-h_qSft1A.js → permissions-CwN_YP3u.js} +2 -1
- package/dist/owletto/dist/assets/proposal-review-shell-DKKGu4Ww.js +2 -0
- package/dist/owletto/dist/assets/public-shell-ready-7KYnww6e.js +2 -0
- package/dist/owletto/dist/assets/{recent-JiBNvZzD.js → recent-DqdZE_TI.js} +2 -1
- package/dist/owletto/dist/assets/record-activity-CvgZyCmw.js +2 -0
- package/dist/owletto/dist/assets/{renderer-DgPLyEbx.js → renderer-BL6VcwQH.js} +28 -27
- package/dist/owletto/dist/assets/reset-password-DAvBYkiI.js +2 -0
- package/dist/owletto/dist/assets/runs-BWtc5rmc.js +2 -0
- package/dist/owletto/dist/assets/runs-panel-BO3h5RkS.js +2 -0
- package/dist/owletto/dist/assets/runs-table-DxIiqrSk.js +2 -0
- package/dist/owletto/dist/assets/settings-4Ev-0iNL.js +2 -0
- package/dist/owletto/dist/assets/settings-Crxlwps-.js +2 -0
- package/dist/owletto/dist/assets/skill-editor-D_W3QlRz.js +1 -0
- package/dist/owletto/dist/assets/skills-D0X430X8.js +2 -0
- package/dist/owletto/dist/assets/source-record-panels-CRIPMWfN.js +2 -0
- package/dist/owletto/dist/assets/status-dot-C5KDvvm9.js +2 -0
- package/dist/owletto/dist/assets/tabs-B4Er9hJj.js +2 -0
- package/dist/owletto/dist/assets/{use-mention-search-B4DfZFm5.js → use-mention-search-DqEykWl_.js} +3 -2
- package/dist/owletto/dist/assets/view-param-filters-Cylutoy1.js +2 -0
- package/dist/owletto/dist/assets/workspace-label-o_QfBuCM.js +2 -0
- package/dist/owletto/dist/index.html +46 -4
- package/dist/providers.json +1 -1
- package/dist/server-main.bundle.mjs +135551 -132880
- package/npm-shrinkwrap.json +578 -611
- package/package.json +4 -3
- package/vendor/connector-sdk/dist/browser-requirement.d.ts +36 -0
- package/vendor/connector-sdk/dist/browser-requirement.js +60 -0
- package/vendor/connector-sdk/dist/connector-runtime.d.ts +3 -1
- package/vendor/connector-sdk/dist/connector-runtime.js +10 -0
- package/vendor/connector-sdk/dist/connector-types.d.ts +159 -45
- package/vendor/connector-sdk/dist/define-connector.d.ts +4 -2
- package/vendor/connector-sdk/dist/define-connector.js +3 -0
- package/vendor/connector-sdk/dist/index.d.ts +5 -2
- package/vendor/connector-sdk/dist/index.js +1 -0
- package/vendor/connector-sdk/dist/reaction-client-types.d.ts +16 -21
- package/vendor/connector-sdk/dist/reaction-client-types.typecheck.d.ts +5 -0
- package/vendor/connector-sdk/package.json +5 -1
- package/vendor/core/dist/agent-policy.js +1 -1
- package/vendor/core/dist/agent-store.d.ts +2 -0
- package/vendor/core/dist/agent-tooling.d.ts +1 -1
- package/vendor/core/dist/agent-tooling.js +1 -1
- package/vendor/core/dist/capabilities.js +2 -0
- package/vendor/core/dist/contracts/agent-settings.d.ts +0 -11
- package/vendor/core/dist/contracts/agent-settings.js +1 -7
- package/vendor/core/dist/contracts/tools/collection-presentation.d.ts +93 -0
- package/vendor/core/dist/contracts/tools/collection-presentation.js +88 -0
- package/vendor/core/dist/contracts/tools/collection-selection.d.ts +47 -0
- package/vendor/core/dist/contracts/tools/collection-selection.js +74 -0
- package/vendor/core/dist/contracts/tools/manage-agents.d.ts +10 -4
- package/vendor/core/dist/contracts/tools/manage-auth-profiles.d.ts +1 -1
- package/vendor/core/dist/contracts/tools/manage-auth-profiles.js +5 -1
- package/vendor/core/dist/contracts/tools/manage-automations.d.ts +19 -4
- package/vendor/core/dist/contracts/tools/manage-automations.js +25 -8
- package/vendor/core/dist/contracts/tools/manage-connections.d.ts +1 -0
- package/vendor/core/dist/contracts/tools/manage-connections.js +3 -0
- package/vendor/core/dist/contracts/tools/manage-entity-schema.d.ts +11 -0
- package/vendor/core/dist/contracts/tools/manage-entity-schema.js +42 -3
- package/vendor/core/dist/contracts/tools/manage-entity.d.ts +181 -152
- package/vendor/core/dist/contracts/tools/manage-entity.js +118 -162
- package/vendor/core/dist/contracts/tools/manage-operations.d.ts +41 -3
- package/vendor/core/dist/contracts/tools/manage-operations.js +40 -2
- package/vendor/core/dist/contracts/tools/manage-views.d.ts +182 -7
- package/vendor/core/dist/contracts/tools/manage-views.js +49 -13
- package/vendor/core/dist/contracts/tools/read-knowledge.d.ts +11 -2
- package/vendor/core/dist/contracts/tools/read-knowledge.js +23 -3
- package/vendor/core/dist/contracts/tools/save-memory.d.ts +3 -6
- package/vendor/core/dist/contracts/tools/save-memory.js +2 -6
- package/vendor/core/dist/contracts/tools/view-attach.d.ts +2 -1
- package/vendor/core/dist/contracts/tools/view-attach.js +7 -2
- package/vendor/core/dist/contracts/worker/protocol.d.ts +122 -28
- package/vendor/core/dist/contracts/worker/protocol.js +81 -17
- package/vendor/core/dist/index.d.ts +3 -4
- package/vendor/core/dist/index.js +3 -6
- package/vendor/core/dist/json-template.d.ts +6 -10
- package/vendor/core/dist/json-template.js +5 -9
- package/vendor/core/dist/logger.js +11 -5
- package/vendor/core/dist/shell-safety.d.ts +9 -0
- package/vendor/core/dist/shell-safety.js +154 -0
- package/vendor/core/dist/suggestions.d.ts +1 -1
- package/vendor/core/dist/suggestions.js +1 -1
- package/vendor/core/dist/tool-trace-summary.d.ts +1 -1
- package/vendor/core/dist/tool-trace-summary.js +1 -1
- package/vendor/core/dist/types.d.ts +1 -3
- package/vendor/core/dist/utils/diagnostic-scrubber.d.ts +7 -0
- package/vendor/core/dist/utils/{sentry-scrubber.js → diagnostic-scrubber.js} +25 -53
- package/vendor/core/dist/worker/auth.d.ts +44 -6
- package/vendor/core/dist/worker/auth.js +44 -11
- package/vendor/core/package.json +15 -6
- package/vendor/views/dist/api.d.ts +39 -29
- package/vendor/views/dist/api.js +110 -83
- package/vendor/views/dist/bridge.d.ts +4 -0
- package/vendor/views/dist/bridge.js +15 -0
- package/vendor/views/dist/index.d.ts +1 -0
- package/vendor/views/dist/index.js +0 -7
- package/vendor/views/package.json +4 -1
- package/dist/owletto/dist/assets/_-CLhipgJI.js +0 -1
- package/dist/owletto/dist/assets/_-D0ZVGAIA.js +0 -2
- package/dist/owletto/dist/assets/_agentId-BLXUf3ot.js +0 -1
- package/dist/owletto/dist/assets/_agentId-DnI66MF3.js +0 -1
- package/dist/owletto/dist/assets/_automationId-ziwseLb7.js +0 -1
- package/dist/owletto/dist/assets/_connectorKey._connectionId-B6V3ySFK.js +0 -1
- package/dist/owletto/dist/assets/_connectorKey.index-CR5u_dtt.js +0 -1
- package/dist/owletto/dist/assets/_conversationId-FBMYmOl8.js +0 -1
- package/dist/owletto/dist/assets/_deploymentId-DNTXbT_m.js +0 -1
- package/dist/owletto/dist/assets/_name-B37LKIxH.js +0 -1
- package/dist/owletto/dist/assets/_owner-BxYumqC2.js +0 -1
- package/dist/owletto/dist/assets/_shape-Bxz-04jR.js +0 -1
- package/dist/owletto/dist/assets/_skillKey-D5MFbiw2.js +0 -1
- package/dist/owletto/dist/assets/_slug-Dlhit09k.js +0 -1
- package/dist/owletto/dist/assets/_viewKey-C6535i-t.js +0 -1
- package/dist/owletto/dist/assets/_viewKey-CQCtY3Y8.js +0 -1
- package/dist/owletto/dist/assets/_viewKey-CxKfKbRa.js +0 -1
- package/dist/owletto/dist/assets/accept-invitation-BQQwec3R.js +0 -1
- package/dist/owletto/dist/assets/activity-route-view-BwThvdGs.js +0 -1
- package/dist/owletto/dist/assets/agent-card-controls-B3RhzsPz.js +0 -1
- package/dist/owletto/dist/assets/agent-connect-pages-BO4wQn4L.js +0 -1
- package/dist/owletto/dist/assets/agent-editor-form-BYC4uSNz.js +0 -1
- package/dist/owletto/dist/assets/agent-guardrails-route-Dp02G1AQ.js +0 -1
- package/dist/owletto/dist/assets/agent-loading-shells-OagauQzV.js +0 -1
- package/dist/owletto/dist/assets/agent-permissions-matrix-B9Ho3P1t.js +0 -1
- package/dist/owletto/dist/assets/agent-skills-route-B4VUnVi0.js +0 -1
- package/dist/owletto/dist/assets/agent-subpage-shell-Dz8I-GUt.js +0 -1
- package/dist/owletto/dist/assets/agent-thread-B9-cdkaV.js +0 -8
- package/dist/owletto/dist/assets/agent-thread-storage-U6htL3ad.js +0 -1
- package/dist/owletto/dist/assets/agents-D0CIg4b9.js +0 -1
- package/dist/owletto/dist/assets/agents-workbench-C2sr5h82.js +0 -1
- package/dist/owletto/dist/assets/app-bridge-BH3g2mKG.js +0 -127
- package/dist/owletto/dist/assets/app._appId-DLsJ_QWS.js +0 -1
- package/dist/owletto/dist/assets/automation-detail-content-9Rjb_I9j.js +0 -1
- package/dist/owletto/dist/assets/automations-D0CIg4b9.js +0 -1
- package/dist/owletto/dist/assets/calendar-DAiyi1ZL.js +0 -1
- package/dist/owletto/dist/assets/claim-CYHnUF7G.js +0 -1
- package/dist/owletto/dist/assets/clients-Cp1BJ28u.js +0 -1
- package/dist/owletto/dist/assets/code-editor-CYsR2VBP.js +0 -15
- package/dist/owletto/dist/assets/connect-CZip2g_B.js +0 -1
- package/dist/owletto/dist/assets/connect._clientId-CEKY8Dnv.js +0 -1
- package/dist/owletto/dist/assets/connected._clientId-C5xRjxNO.js +0 -1
- package/dist/owletto/dist/assets/connection-C06HZ241.js +0 -1
- package/dist/owletto/dist/assets/connection-feed-detail-D1whY5hL.js +0 -1
- package/dist/owletto/dist/assets/consent-CfYDldcF.js +0 -1
- package/dist/owletto/dist/assets/create-C3P-3_8O.js +0 -1
- package/dist/owletto/dist/assets/create-CwnrPUEw.js +0 -1
- package/dist/owletto/dist/assets/create-DOScS9Gl.js +0 -1
- package/dist/owletto/dist/assets/create-automation-form-CuxiIRCF.js +0 -2
- package/dist/owletto/dist/assets/create._connectorKey-Bjv3lCf8.js +0 -1
- package/dist/owletto/dist/assets/deployments-ByBv1DW-.js +0 -1
- package/dist/owletto/dist/assets/deployments-C-_ECORv.js +0 -1
- package/dist/owletto/dist/assets/device-B0i7Xp8y.js +0 -1
- package/dist/owletto/dist/assets/device-automation-BIjs7DZJ.js +0 -1
- package/dist/owletto/dist/assets/device-pin-tombstone-Bd6vS2zu.js +0 -1
- package/dist/owletto/dist/assets/device-rows-Bwf8qDte.js +0 -1
- package/dist/owletto/dist/assets/device._deviceId-DJLAesm3.js +0 -1
- package/dist/owletto/dist/assets/entity-page-ijZe_1-6.js +0 -1
- package/dist/owletto/dist/assets/entity-type-page-onp2Tk_E.js +0 -1
- package/dist/owletto/dist/assets/event-page-C0B2UDY-.js +0 -1
- package/dist/owletto/dist/assets/events-feed-DK35T4g7.js +0 -1
- package/dist/owletto/dist/assets/full-page-spinner-Dd8eEaxq.js +0 -1
- package/dist/owletto/dist/assets/guardrails-DKO8_J-G.js +0 -1
- package/dist/owletto/dist/assets/identity-CKM54vrM.js +0 -1
- package/dist/owletto/dist/assets/index--VmN5WxW.js +0 -1
- package/dist/owletto/dist/assets/index-B2AmRqYh.js +0 -7898
- package/dist/owletto/dist/assets/index-B_rcEgFX.js +0 -1
- package/dist/owletto/dist/assets/index-BmAuAhub.css +0 -1
- package/dist/owletto/dist/assets/index-BmhGe6-Z.js +0 -1
- package/dist/owletto/dist/assets/index-C1dJSGrL.js +0 -1
- package/dist/owletto/dist/assets/index-CAFw4qCb.js +0 -1
- package/dist/owletto/dist/assets/index-CCcc_xBw.js +0 -52
- package/dist/owletto/dist/assets/index-CLU3gXVm.js +0 -1
- package/dist/owletto/dist/assets/index-CqQVnAY-.js +0 -1
- package/dist/owletto/dist/assets/index-CxT0uyIe.js +0 -1
- package/dist/owletto/dist/assets/index-DR08e6Ec.js +0 -1
- package/dist/owletto/dist/assets/index-DYb9L5FC.js +0 -1
- package/dist/owletto/dist/assets/index-SUUcQGT-.js +0 -1
- package/dist/owletto/dist/assets/index-SdiFOfR1.js +0 -1
- package/dist/owletto/dist/assets/index-zcfi5r1l.js +0 -1
- package/dist/owletto/dist/assets/json-diff-ClBBYBQD.js +0 -3
- package/dist/owletto/dist/assets/login-d3PdO-qV.js +0 -1
- package/dist/owletto/dist/assets/logout-DgckxwLn.js +0 -1
- package/dist/owletto/dist/assets/member-scope-gate-DXOCfx-v.js +0 -1
- package/dist/owletto/dist/assets/memory-browse-page-CeAnKoTR.js +0 -101
- package/dist/owletto/dist/assets/missing-view-DrZ8m8yo.js +0 -1
- package/dist/owletto/dist/assets/model-selector-CapL1ARf.js +0 -1
- package/dist/owletto/dist/assets/models-CB8mhq7j.js +0 -1
- package/dist/owletto/dist/assets/new-BBUb-VR4.js +0 -1
- package/dist/owletto/dist/assets/new-CBLJ25_w.js +0 -1
- package/dist/owletto/dist/assets/new-tTXB4qBW.js +0 -1
- package/dist/owletto/dist/assets/oauth-workspace-access-DearynqZ.js +0 -1
- package/dist/owletto/dist/assets/organization-BgdBg-PJ.js +0 -1
- package/dist/owletto/dist/assets/pending-seed-CPbfgnLX.js +0 -1
- package/dist/owletto/dist/assets/proposal-review-shell-D4YNrrye.js +0 -1
- package/dist/owletto/dist/assets/reset-password-B8tWPtIj.js +0 -1
- package/dist/owletto/dist/assets/runs-oHveuEUB.js +0 -1
- package/dist/owletto/dist/assets/runs-panel-C56GDaJm.js +0 -1
- package/dist/owletto/dist/assets/runs-table-BUKDjiBc.js +0 -1
- package/dist/owletto/dist/assets/schema-value-normalization-3JuM_r1H.js +0 -1
- package/dist/owletto/dist/assets/settings-DaKg6U5O.js +0 -1
- package/dist/owletto/dist/assets/settings-DhnRi2nq.js +0 -1
- package/dist/owletto/dist/assets/skills-BpQncuMC.js +0 -1
- package/dist/owletto/dist/assets/switch-BQ40_DMb.js +0 -1
- package/dist/owletto/dist/assets/use-applied-views-B-Z-Weji.js +0 -1
- package/dist/owletto/dist/assets/view-frame-C7ciEoLo.js +0 -1
- package/vendor/core/dist/sentry.d.ts +0 -26
- package/vendor/core/dist/sentry.js +0 -133
- package/vendor/core/dist/tool-policy.d.ts +0 -74
- package/vendor/core/dist/tool-policy.js +0 -305
- package/vendor/core/dist/utils/sentry-scrubber.d.ts +0 -29
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e,L as i}from"./index-B2AmRqYh.js";function l({viewKey:t,backTo:s,backLabel:n}){return e.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center","data-testid":"missing-view",children:[e.jsxs("h2",{className:"text-lg font-semibold",children:["No view named “",t,"” here"]}),e.jsx("p",{className:"text-muted-foreground mt-2 text-sm",children:"It may have been renamed or detached from this page."}),e.jsx(i,{to:s,className:"mt-4 text-sm font-medium underline underline-offset-4",children:n})]})}function r({onRetry:t}){return e.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center","data-testid":"views-unavailable",children:[e.jsx("h2",{className:"text-lg font-semibold",children:"Views couldn’t be loaded"}),e.jsx("button",{type:"button",onClick:t,className:"mt-4 text-sm font-medium underline underline-offset-4",children:"Try again"})]})}export{l as M,r as V};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b6 as g,b7 as N,j as s,cB as y,cC as m,aL as p,af as f,B as w,dO as b}from"./index-B2AmRqYh.js";function M(o,r){const l=new Map(r.map(e=>[e.slug,e])),i=new Map,d=e=>{const a=e.model?.trim();if(!a)return;const t=`${e.slug}/${a}`;i.has(t)||i.set(t,{value:t,provider:e.provider,model:a,isDefault:e.isDefault})};for(const e of o){const a=l.get(e.kind)??l.get(e.slug),t={slug:e.slug,provider:e.displayName||e.slug,isDefault:e.isDefault};d({...t,model:e.capabilities.text?.model}),d({...t,model:a?.defaultModel});for(const x of a?.models??[])d({...t,model:x})}for(const e of r){if(!e.systemAvailable)continue;const a={slug:e.slug,provider:e.displayName||e.slug,isDefault:!1};d({...a,model:e.defaultModel});for(const t of e.models)d({...a,model:t})}return[...i.values()]}function _(o,r){const l=o.trim();return l.length>0&&l!=="auto"&&!r.some(i=>i.value===l)}function S({value:o,onChange:r,placeholder:l,disabled:i,className:d}){const{data:e=[]}=g(),{data:a=[]}=N(),t=M(e,a),x=t.find(c=>c.value===o),h=o==="auto"?"auto":x?.value??o;return s.jsx(y,{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:c=>s.jsxs(w,{type:"button",variant:"outline",role:"combobox","aria-expanded":c,disabled:i,className:f("w-full justify-between font-normal",o?"":"text-muted-foreground",d),children:[s.jsx("span",{className:"truncate",children:o?h:l}),s.jsx(b,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]}),children:(c,j)=>{const u=j.trim(),v=_(u,t);return s.jsxs(s.Fragment,{children:[s.jsxs(m,{value:"__inherit__ use default inherit",onSelect:()=>{r(""),c()},className:"cursor-pointer",children:[s.jsx(p,{className:f("mr-2 h-4 w-4",o===""?"opacity-100":"opacity-0")}),s.jsx("span",{className:"text-muted-foreground",children:l})]}),s.jsxs(m,{value:"auto newest latest",onSelect:()=>{r("auto"),c()},className:"cursor-pointer",children:[s.jsx(p,{className:f("mr-2 h-4 w-4",o==="auto"?"opacity-100":"opacity-0")}),s.jsxs("span",{children:["auto"," ",s.jsx("span",{className:"text-muted-foreground text-xs",children:"(newest for the provider)"})]})]}),t.map(n=>s.jsxs(m,{value:`${n.provider} ${n.model} ${n.value}`,onSelect:()=>{r(n.value),c()},className:"cursor-pointer",children:[s.jsx(p,{className:f("mr-2 h-4 w-4",o===n.value?"opacity-100":"opacity-0")}),s.jsxs("span",{className:"truncate",children:[n.provider," ",s.jsx("span",{className:"text-muted-foreground text-xs",children:n.model}),n.isDefault?s.jsx("span",{className:"ml-1.5 text-muted-foreground text-xs",children:"· org default"}):null]})]},n.value)),v?s.jsxs(m,{value:`__custom__ ${u}`,onSelect:()=>{r(u),c()},className:"cursor-pointer",children:[s.jsx(p,{className:"mr-2 h-4 w-4 opacity-0"}),s.jsxs("span",{children:["Use ",s.jsx("span",{className:"font-mono text-xs",children:u})]})]}):null]})}})}export{S as M,M as b,_ as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i6 as e,j as r}from"./index-B2AmRqYh.js";import{a as m}from"./agents-workbench-C2sr5h82.js";import"./agent-editor-form-BYC4uSNz.js";import"./model-selector-CapL1ARf.js";import"./proposal-review-shell-D4YNrrye.js";import"./runs-oHveuEUB.js";function g(){const{owner:o,agentId:t}=e.useParams();return r.jsx(m,{owner:o,agentId:t,tab:"models"})}export{g as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as z,p as F,a5 as L,r,j as e,a6 as v,a7 as S,B as U,a8 as N,a9 as E}from"./index-B2AmRqYh.js";import{C as A,a as I,b as T,c as k}from"./card-CMmh2mzo.js";import{F as B}from"./full-page-spinner-Dd8eEaxq.js";function c(l){return l.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function H(){const l=z(),{session:u,isReady:d}=F(),{slug:n,name:i}=L.useSearch(),[m,y]=r.useState(i||n||""),[g,h]=r.useState(n||(i?c(i):"")),[b,C]=r.useState(!!n),[x,o]=r.useState(null),[f,p]=r.useState(!1),j=r.useRef(!1);if(r.useEffect(()=>{if(!d||u||j.current)return;j.current=!0;const a=new URL("/orgs/new",window.location.origin);n&&a.searchParams.set("slug",n),i&&a.searchParams.set("name",i);const s=new URL("/auth/login",window.location.origin);s.searchParams.set("callbackUrl",`${a.pathname}${a.search}`),window.location.assign(s.toString())},[d,u,n,i]),!d||!u)return e.jsx(B,{});const P=a=>{const s=E(a);if(s.kind==="cross-host"){window.location.assign(s.href);return}l({to:s.to})},R=async a=>{a.preventDefault(),o(null);const s=m.trim(),w=(g.trim()||c(s)).trim();if(!s){o("Name is required");return}if(!w){o("Slug is required");return}p(!0);try{const t=await N.create({name:s,slug:w});if(t.error){o(t.error.message||"Failed to create organization");return}t.data&&(await N.setActive({organizationId:t.data.id}),P(t.data.slug))}catch(t){o(t instanceof Error?t.message:"An error occurred")}finally{p(!1)}};return e.jsx("div",{className:"container mx-auto max-w-md px-4 py-10",children:e.jsxs(A,{children:[e.jsx(I,{children:e.jsx(T,{children:"Create organization"})}),e.jsx(k,{children:e.jsxs("form",{onSubmit:R,className:"space-y-4",children:[x&&e.jsx("div",{className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:x}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(v,{htmlFor:"org-name",children:["Name",e.jsx("span",{className:"ml-1 text-destructive",children:"*"})]}),e.jsx(S,{id:"org-name",value:m,onChange:a=>{y(a.target.value),b||h(c(a.target.value))},placeholder:"Acme Inc.",autoFocus:!0})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(v,{htmlFor:"org-slug",children:["Slug",e.jsx("span",{className:"ml-1 text-destructive",children:"*"})]}),e.jsx(S,{id:"org-slug",value:g,onChange:a=>{C(!0),h(c(a.target.value))},placeholder:"acme"}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Used in URLs and as the org id in ",e.jsx("code",{children:"lobu.toml"}),". Lowercase letters, numbers, and hyphens."]})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx(U,{type:"submit",disabled:f,children:f?"Creating…":"Create organization"})})]})})]})})}export{H as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{gJ as o,_ as p,am as x,p as b,q as h,bt as f,j as e,ba as A,gA as w,aQ as L,gB as C,L as j,gC as S,fP as N,bk as k,cd as y}from"./index-B2AmRqYh.js";import{A as E}from"./agent-editor-form-BYC4uSNz.js";import"./model-selector-CapL1ARf.js";const _="flex min-h-0 flex-1 flex-col gap-3 px-4 pt-4 pb-8 lg:px-6";function q(){const{owner:a}=o.useParams(),t=o.useSearch(),r=p(),i=x(),{isAuthenticated:c}=b(),{isMember:g,isLoading:m}=h(),n=c&&g,{data:u=[],isLoading:d}=f({enabled:n});return e.jsx("div",{className:_,children:e.jsxs(A,{className:"flex flex-1 flex-col gap-6",children:[e.jsx(w,{breadcrumb:e.jsx(C,{crumbs:[e.jsx(j,{to:"/$owner/agents",params:{owner:a},className:S,children:"Agents"},"agents")]}),icon:e.jsx(L.agents.icon,{className:"h-6 w-6"}),title:"Build a managed agent",caption:"Create an agent that Lobu runs and manages for this workspace."}),m||n&&d?e.jsx(N,{rows:1}):n?e.jsx(E,{mode:{kind:"create"},existingAgentIds:u.map(s=>s.agentId),onCreated:async s=>{const l=["agents",a];if(await i.refetchQueries({queryKey:l,exact:!0}),t.platform&&t.listen){await r({to:"/$owner/automations/new",params:{owner:a},search:{...t,agent:s}});return}await r({to:"/$owner/agents/$agentId/settings",params:{owner:a,agentId:s},search:{run_id:void 0}})}}):e.jsx(k,{icon:y,title:"Workspace membership required",description:"Only workspace members can build managed agents."})]})})}export{q as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as j,q as p,a as N,r as x,j as e,B as w,eD as y,bF as _,L as b,S as f,gH as v,aS as C}from"./index-B2AmRqYh.js";import{C as S,A as k}from"./create-automation-form-CuxiIRCF.js";import"./cronstrue-2GHCtD7h.js";import"./entity-options-CrbS6K-i.js";import"./connection-label-BobuYiAG.js";import"./switch-BQ40_DMb.js";import"./device-automation-BIjs7DZJ.js";import"./model-selector-CapL1ARf.js";import"./skill-editor-D_W3QlRz.js";import"./code-editor-CYsR2VBP.js";import"./index-CDz3-ieP.js";import"./index-Vcq4gwWv.js";import"./use-mention-search-B4DfZFm5.js";function A(s){return s.includes(":")?s.slice(s.indexOf(":")+1):s}function T({prefillAgentId:s,onCancel:t,initialTriggers:m}){const{org:g}=p(),[o,i]=x.useState({ready:!1,triggers:[]}),[a,l]=x.useState(),h=x.useCallback(n=>{i(u=>JSON.stringify(u)===JSON.stringify(n)?u:n)},[]),c=a??m;return e.jsx(S,{startFromScratch:!!m,organizationId:g?.id??"",prefillAgentId:s,onClose:t,onPrefillTriggers:n=>l(n.length>0?n:void 0),onSuccess:t,hideHeader:!0,hideCancel:!0,submitLabel:"Create Automation",submitDisabled:!o.ready,createFields:{triggers:o.triggers},triggerFields:e.jsx(k,{organizationId:g?.id??null,initialTriggers:c,onChange:h},JSON.stringify(c??"new"))})}function B({owner:s,prefilled:t}){const m=j(),{org:g}=p(),o=N(g?.id??null,{status:"active",limit:500}),i=!!(t?.platform&&(t.listen||t.resource)),a=x.useMemo(()=>{if(!t?.platform||!t.listen&&!t.resource)return;const c=o.data??[],n=t.connection?c.find(r=>r.slug===t.connection):(()=>{const r=c.filter(d=>d.connector_key!==t.platform?!1:t.resource?!0:d.facets.chat&&(d.external_tenant_id??"")===(t.team??""));return r.length===1?r[0]:void 0})();if(t.connection&&!n)return;const u=t.events?.split(",").map(r=>r.trim()).filter(Boolean)??[];return[{kind:"event",source:"connector",connector_key:t.platform,...n?{connection_id:n.id}:{},event_types:u.length>0?u:t.listen?["message.created"]:[],match:t.resource?{resource_ref:t.resource,...t.resource_type?{resource_type:t.resource_type}:{}}:{channel_id:A(t.listen??"")},execution:"turn",active_run:t.listen?"steer":"queue",output:t.listen?"reply_to_source":"silent",skip_if_unchanged:!t.listen}]},[o.data,t]),l=()=>void m({to:"/$owner/automations",params:{owner:s}}),h=a?t?.resource?`React to changes on ${t.label??t.resource}.`:`React to messages in ${t?.label??t?.listen}.`:i&&!o.isLoading?"Choose the matching connection and event, then define the reaction.":"Start from a template, from scratch, or clone an existing Automation.";return e.jsx("div",{className:"flex flex-1 flex-col gap-6 px-4 py-6 lg:px-6",children:e.jsxs("div",{className:"mx-auto flex w-full min-w-0 max-w-3xl flex-col gap-4",children:[e.jsx("div",{className:"flex flex-wrap items-center justify-between gap-3",children:e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsxs(w,{type:"button",variant:"ghost",size:"sm",className:"h-8 gap-1.5 text-muted-foreground hover:text-foreground",onClick:l,children:[e.jsx(y,{className:"h-3.5 w-3.5"}),"Automations"]}),e.jsxs("h1",{className:"flex min-w-0 items-center gap-2 truncate font-display text-xl font-semibold",children:[e.jsx(_,{className:"h-4 w-4 shrink-0 text-muted-foreground","aria-hidden":!0}),"New automation"]})]})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:h}),t?.listen&&a?e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Choose an agent below, or"," ",e.jsx(b,{to:"/$owner/agents/new",params:{owner:s},search:t,className:"underline underline-offset-4",children:"create an agent"})," ","and return to this conversation setup."]}):null,i&&o.isLoading?e.jsxs("div",{className:"space-y-3",children:[e.jsx(f,{className:"h-10 w-full"}),e.jsx(f,{className:"h-32 w-full"})]}):i&&t?.connection&&!a?e.jsx("p",{role:"alert",className:"text-sm text-destructive",children:"This connection is no longer available. Reopen setup from your conversation."}):e.jsx(T,{prefillAgentId:t?.agent,onCancel:l,initialTriggers:a})]})})}function W(){const{owner:s}=v.useParams(),t=v.useSearch();return e.jsx(C,{owner:s,children:()=>e.jsx(B,{owner:s,prefilled:t})})}export{W as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e,ab as k,af as $,ag as E,B as R,r as p,ah as P}from"./index-B2AmRqYh.js";const W=["mcp:read","mcp:write","mcp:admin"],O=[{value:"read",title:"Read only",description:"Search and view authorized workspace data."},{value:"write",title:"Read and make changes",description:"Includes read access. Create and update authorized workspace data."},{value:"admin",title:"Administer workspaces",description:"Includes read and write access. Manage administrator-only settings.",risk:"high"}],C={read:0,write:1,admin:2};function I(s){return s.includes("mcp:admin")?"admin":s.includes("mcp:write")?"write":s.includes("mcp:read")?"read":null}function F(s,n){const r=s.filter(x=>!W.includes(x));if(!n)return r;const o=I(s);return!o||C[n]>C[o]?r:["mcp:read",...n==="write"||n==="admin"?["mcp:write"]:[],...n==="admin"?["mcp:admin"]:[],...r]}function B({idPrefix:s,clientName:n,requestedScopes:r,accessLevel:o,onAccessLevelChange:x,sensitiveScopesAcknowledged:g=!1,onSensitiveScopesAcknowledgedChange:v,disabled:N=!1}){const f=I(r),j=r.includes("profile:read"),m=r.includes("device_worker:run"),i=r.includes("connections:token"),l=m||i,c=r.filter(t=>!W.includes(t)&&t!=="profile:read"&&t!=="device_worker:run"&&t!=="connections:token");return e.jsxs("div",{className:"space-y-5",children:[e.jsxs("section",{"aria-labelledby":`${s}-application`,className:"space-y-2",children:[e.jsx("p",{id:`${s}-application`,className:"text-sm font-medium",children:"Application"}),e.jsxs("div",{className:"rounded-lg border p-4",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{className:"text-sm font-semibold text-foreground",children:n||"Unnamed application"}),e.jsx(k,{variant:"destructive",children:"Unverified"})]}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"This name was supplied by the requester. Lobu has not verified the publisher."})]})]}),f&&e.jsxs("fieldset",{className:"space-y-2",disabled:N,children:[e.jsx("legend",{className:"text-sm font-medium",children:"Access level"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose the maximum access this application should receive."}),e.jsx("div",{className:"space-y-2",children:O.filter(t=>C[t.value]<=C[f]).map(t=>{const h=`${s}-access-${t.value}`,b=o===t.value;return e.jsxs("label",{htmlFor:h,className:$("flex cursor-pointer items-start gap-3 rounded-md border p-3 transition-colors",b&&"border-primary bg-primary/5"),children:[e.jsx("input",{id:h,type:"radio",name:`${s}-access-level`,value:t.value,checked:b,onChange:()=>x(t.value),className:"mt-1 h-4 w-4 accent-primary"}),e.jsxs("span",{className:"min-w-0 space-y-0.5",children:[e.jsxs("span",{className:"flex flex-wrap items-center gap-2 text-sm font-medium text-foreground",children:[t.title,t.risk==="high"&&e.jsx(k,{variant:"destructive",children:"High risk"})]}),e.jsx("span",{className:"block text-sm text-muted-foreground",children:t.description})]})]},t.value)})})]}),j&&e.jsxs("section",{"aria-labelledby":`${s}-profile`,className:"space-y-2",children:[e.jsx("p",{id:`${s}-profile`,className:"text-sm font-medium",children:"Account information"}),e.jsxs("div",{className:"rounded-md border p-3",children:[e.jsxs("p",{className:"flex flex-wrap items-center gap-2 text-sm font-medium text-foreground",children:["Basic profile",e.jsx(k,{variant:"secondary",children:"Included"})]}),e.jsx("p",{className:"mt-0.5 text-sm text-muted-foreground",children:"See your basic Lobu identity and the names and slugs of workspaces you belong to."})]})]}),c.length>0&&e.jsxs("section",{"aria-labelledby":`${s}-additional`,className:"space-y-2",children:[e.jsx("p",{id:`${s}-additional`,className:"text-sm font-medium",children:"Additional permissions"}),e.jsx("ul",{className:"space-y-2",children:c.map(t=>e.jsx("li",{className:"rounded-md border p-3 font-mono text-xs text-foreground",children:t},t))})]}),l&&e.jsxs("section",{className:"space-y-3 rounded-md border border-destructive/40 bg-destructive/5 p-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"Device capabilities"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"These capabilities are fixed by the device request and cannot be reduced here."})]}),e.jsxs("ul",{className:"space-y-2",children:[m&&e.jsxs("li",{className:"rounded-md bg-background/70 p-3",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"Operate this device"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Run jobs and Automations through capabilities advertised by this device."})]}),i&&e.jsxs("li",{className:"rounded-md bg-background/70 p-3",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"Use connected services"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Request short-lived access for services you connected to Lobu."})]})]}),e.jsxs("div",{className:"flex items-start gap-3 rounded-md border bg-background p-3",children:[e.jsx(E,{id:`${s}-sensitive-acknowledgement`,checked:g,disabled:N,onCheckedChange:t=>v?.(t===!0),className:"mt-0.5"}),e.jsx("label",{htmlFor:`${s}-sensitive-acknowledgement`,className:"cursor-pointer text-sm font-medium text-foreground",children:"I initiated this request and confirmed that the device code matches."})]})]})]})}function q({idPrefix:s,orgList:n,selectedOrgIds:r,onWorkspaceAccessChange:o,onSelectedOrgChange:x,orgsLoading:g,orgsError:v,onRetry:N,disabled:f=!1,personalRequired:j=!1,allowMultiple:m}){const i=`${s}-workspace-access-legend`,l=r.length===n.length;return g?e.jsxs("section",{"aria-labelledby":i,className:"space-y-2",children:[e.jsx("p",{id:i,className:"text-sm font-medium",children:"Workspace access"}),e.jsx("p",{role:"status","aria-live":"polite",className:"text-sm text-muted-foreground",children:"Loading your workspaces..."})]}):v?e.jsxs("section",{"aria-labelledby":i,className:"space-y-2",children:[e.jsx("p",{id:i,className:"text-sm font-medium",children:"Workspace access"}),e.jsxs("div",{role:"alert",className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:[e.jsx("p",{children:"Workspaces could not be loaded. Approval is unavailable until they load."}),e.jsx(R,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:N,children:"Retry"})]})]}):n.length===0?e.jsxs("section",{"aria-labelledby":i,className:"space-y-2",children:[e.jsx("p",{id:i,className:"text-sm font-medium",children:"Workspace access"}),e.jsx("p",{role:"alert",className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:"No member workspaces are available for this connection."})]}):e.jsxs("fieldset",{className:"space-y-3",disabled:f,children:[e.jsx("legend",{id:i,className:"sr-only",children:"Workspace access"}),e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:"Workspaces"}),e.jsx("p",{className:"mt-0.5 text-sm text-muted-foreground",children:m?"Choose where this application can operate.":"Choose one workspace this application can access."})]}),m&&!l&&e.jsxs(R,{type:"button",variant:"outline",size:"sm",onClick:()=>o("all_current"),children:["Select all ",n.length]})]}),j&&e.jsxs("div",{className:"rounded-md border border-primary/20 bg-primary/5 p-3 text-sm",children:[e.jsx("p",{className:"font-medium text-foreground",children:"Device home: Personal workspace"}),e.jsx("p",{className:"mt-0.5 text-muted-foreground",children:m?"Fixed for device data. Additional workspaces grant MCP access only.":"Device data stays in your personal workspace."})]}),e.jsx("div",{className:"space-y-2",children:n.map(c=>{const t=`${s}-workspace-${c.id}`,h=j&&c.isPersonal,b=r.includes(c.id);return e.jsxs("div",{className:$("flex items-start gap-3 rounded-md border p-3 transition-colors",b&&"border-primary/40 bg-primary/5"),children:[e.jsx(E,{id:t,checked:b,disabled:f||h||j&&!m,onCheckedChange:S=>x(c.id,S===!0),className:"mt-0.5"}),e.jsxs("label",{htmlFor:t,className:"min-w-0 flex-1 cursor-pointer space-y-0.5",children:[e.jsxs("span",{className:"flex flex-wrap items-center gap-2 text-sm font-medium text-foreground",children:[c.name,c.isPersonal&&e.jsx(k,{variant:"outline",children:"Personal"}),h&&e.jsx(k,{variant:"secondary",children:"Required"})]}),e.jsx("span",{className:"block text-xs text-muted-foreground",children:c.slug})]})]},c.id)})}),e.jsxs("div",{className:"flex items-center justify-between gap-3 text-xs text-muted-foreground",children:[e.jsxs("p",{"aria-live":"polite",children:[r.length," of ",n.length," workspaces selected."]}),l&&e.jsx(k,{variant:"secondary",children:"All currently available"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Workspaces you join later are not added automatically."}),r.length===0&&e.jsx("p",{role:"alert",className:"text-xs text-destructive",children:"Choose at least one workspace."})]})}function D(s,n){p.useEffect(()=>{if(n||s)return;const r=new URL("/auth/login",window.location.origin);r.searchParams.set("callbackUrl",window.location.href),window.location.href=r.toString()},[s,n])}function U(s,n){return s.length===n.length&&s.every((r,o)=>r===n[o])}function T(s={}){const{requirePersonal:n=!1,allowMultiple:r=!0}=s,{data:o,error:x,isPending:g,refetch:v}=P(),[N,f]=p.useState("selected"),[j,m]=p.useState([]),i=p.useRef(!1),l=p.useMemo(()=>o?o.filter(a=>a.is_member).map(a=>({id:a.id,name:a.name,slug:a.slug,isPersonal:a.is_personal===!0})):[],[o]),c=l.find(a=>a.isPersonal)?.id??null,t=p.useRef(l);t.current=l;const h=x instanceof Error?x.message:x?"Unable to load workspaces":null;p.useEffect(()=>{if(g||h)return;const a=l.map(d=>d.id),u=new Set(a);m(d=>{const w=i.current?d.filter(A=>u.has(A)):[c??a[0]].filter(A=>!!A);return i.current=!0,U(d,w)?d:w})},[l,h,g,c]);const b=p.useCallback(a=>{if(a==="all_current"){if(!r)return;m(t.current.map(u=>u.id))}f(a)},[r]),S=p.useCallback((a,u)=>{t.current.some(d=>d.id===a)&&(n&&(a===c||!r)||(f("selected"),m(d=>u?r?d.includes(a)?d:[...d,a]:[a]:d.filter(w=>w!==a))))},[r,c,n]),y=p.useMemo(()=>{const a=new Set(j);return n&&c&&a.add(c),l.filter(u=>a.has(u.id)).map(u=>u.id)},[j,l,c,n]),L=p.useCallback(()=>{const a=t.current,u=a.find(d=>d.isPersonal)?.id??a[0]?.id;i.current=a.length>0,f("selected"),m(u?[u]:[])},[]),_=!g&&!h&&l.length>0&&y.length>0&&(r||y.length===1)&&(!n||c!==null&&y.includes(c)),M=p.useCallback(()=>{v()},[v]);return{orgList:l,workspaceAccess:N,setWorkspaceAccess:b,selectedOrgIds:y,toggleSelectedOrgId:S,resetWorkspaceSelection:L,personalOrgId:c,orgsLoading:g,orgsError:h,retryOrgs:M,workspaceSelectionReady:_}}function V(s){if(!s)return null;try{return new URL(s).pathname.match(/^\/mcp\/([^/]+)$/)?.[1]?.trim()||null}catch{return null}}export{B as A,q as W,I as a,D as b,V as g,F as s,T as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{am as ge,r as b,bW as Ie,bX as Ke,bY as Ve,bZ as He,j as e,B as C,b_ as Ye,b$ as Ze,c0 as Ge,c1 as De,c2 as Xe,c3 as Le,c4 as Je,c5 as be,aA as ie,c6 as me,c7 as et,c8 as pe,c9 as tt,ca as st,_ as nt,ah as We,Z as it,cb as at,cc as te,U as ot,a6 as Ne,a7 as _e,cd as rt,ce as ct,cf as lt,n as Ce,bu as dt,a8 as de,cg as ut,ch as ke,ci as Se,cj as mt,a9 as pt,ck as Ae,cl as ht}from"./index-B2AmRqYh.js";import{P as he,a as ne,A as gt}from"./agent-permissions-matrix-B9Ho3P1t.js";import{C as we,a as ze,b as Oe,c as Pe}from"./card-CMmh2mzo.js";const ue=["auto","approval","deny"],xt={matched_rule:"Matching policy rules apply.",default_approval:"No rule matches; approval is required.",unresolved_principal:"The requesting agent or Automation could not be identified.",parent_approval:"Approval is inherited from the parent action.",unavailable_operation:"This action is unavailable on the connection."},qe={read:"Reads",write:"Writes",destructive:"Destructive writes",non_destructive:"Non-destructive writes",unknown:"Unclassified writes"};function ft(t){return{resource_class:"connector_action",operation_key:t.operation_key,connector_key:t.connector_key??null,connection_id:t.connection_id??null,operation_category:t.operation_category??null}}function L({label:t,value:i,onChange:a,children:r,disabled:m}){return e.jsxs("label",{className:"flex min-w-0 flex-col gap-1 text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:t}),e.jsx("select",{"aria-label":t,value:i,onChange:u=>a(u.target.value),disabled:m,className:"h-9 w-full rounded-lg border bg-background px-2 text-foreground",children:r})]})}function Be(t,i){const a=i.connections?.find(r=>r.id===t.connection_id);return t.connection_id?`Connection: ${a?.display_name||a?.connector_key||"Unavailable"} (#${t.connection_id})`:t.connector_key?`Connector: ${i.connectors?.find(r=>r.key===t.connector_key)?.name||t.connector_key}`:"All connectors"}function Qe(t,i){return t.operation_key?i.connector_operations.find(a=>a.operation_key===t.operation_key)?.name||t.operation_key:t.operation_category?qe[t.operation_category]:"All actions"}function $e(t,i){return`${Be(t,i)} · ${Qe(t,i)}`}function se(t){return t.connection_id?`connection:${t.connection_id}`:t.connector_key?`connector:${t.connector_key}`:"all"}function Ee({catalog:t}){return e.jsxs(e.Fragment,{children:[e.jsx("option",{value:"all",children:"All connectors"}),e.jsx("optgroup",{label:"Connectors",children:t.connectors?.map(i=>e.jsx("option",{value:`connector:${i.key}`,children:i.name},i.key))}),e.jsx("optgroup",{label:"Connections",children:t.connections?.map(i=>e.jsxs("option",{value:`connection:${i.id}`,children:[i.display_name||i.connector_key," (#",i.id,")"]},i.id))})]})}const yt={connector_key:null,connection_id:null,operation_key:null,operation_category:null};function Te({label:t,ariaLabel:i,disabled:a,onRemove:r}){const[m,u]=b.useState(!1);return m?e.jsxs("div",{className:"flex gap-1",children:[e.jsx(C,{type:"button",variant:"destructive",size:"sm",disabled:a,"aria-label":"Confirm removal",onClick:async()=>{await r()&&u(!1)},children:"Confirm"}),e.jsx(C,{type:"button",variant:"ghost",size:"sm",disabled:a,onClick:()=>u(!1),children:"Cancel"})]}):e.jsx(C,{type:"button",variant:"ghost",size:"sm",disabled:a,"aria-label":i,onClick:()=>u(!0),children:t})}function vt({owner:t,connector:i,connection:a,agent:r}){const m=ge(),[u,N]=b.useState(r??""),A=Ie(t),o=A.data,l=o?.agents.some(s=>s.id===u)?u:"",n=Ke(t,l),g=l?n:A,[k,B]=b.useState(a?`connection:${a}`:i?`connector:${i}`:"all"),[X,Q]=b.useState(k),[M,O]=b.useState(!1),[T,U]=b.useState(""),[P,K]=b.useState("all"),[F,V]=b.useState("approval"),[d,W]=b.useState(!1),[H,q]=b.useState(null),[Y,ae]=b.useState(a?String(a):""),[R,J]=b.useState(""),E=o?.connections?.some(s=>String(s.id)===Y)?Y:"",w=Ve(t,E?Number(E):void 0,R,l||void 0);async function I(s,v){W(!0),q(null);try{const z=ft(s);let _=s;if(v){const f={...z,effects:{execute:v}};_=l?await Ge(t,l,f):await De(t,f)}else(l?await Xe(t,l,z):await Le(t,z))||q("This rule was already removed. The list has been refreshed.");return await Promise.all(["write-permissions","agent-permissions","available-operations","connector-operations","policy-explanation"].map(f=>m.invalidateQueries({queryKey:[f]}))),_}catch(z){q(z instanceof Error?z.message:"Could not save policy.")}finally{W(!1)}}const y=A.error||g.error;if(y instanceof He&&y.status===403)return e.jsx("p",{role:"status",className:"text-sm text-muted-foreground",children:"Only organization owners and admins can manage policies."});if(y)return e.jsxs("p",{role:"alert",className:"text-sm text-destructive",children:["Could not load policies. ",String(A.error||g.error)]});if(!o||!g.data)return e.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading policies…"});const c=g.data,S=s=>s==="all"||o.connectors?.some(v=>`connector:${v.key}`===s)||o.connections?.some(v=>`connection:${v.id}`===s)?s:"all",p=S(k),x=S(X),h=o.connections?.find(s=>`connection:${s.id}`===x),D=h?.connector_key??(x.startsWith("connector:")?x.slice(10):void 0),ee=s=>x==="all"||se(s)==="all"?!0:s.connection_id?h?s.connection_id===h.id:o.connections?.some(v=>v.id===s.connection_id&&v.connector_key===D):s.connector_key===D;function $(s){return l?s.principal_kind==="agent"&&s.principal_id===l:s.principal_kind===null}const Z=p.startsWith("connector:")?p.slice(10):p.startsWith("connection:")?o.connections?.find(s=>s.id===Number(p.slice(11)))?.connector_key:void 0,oe=o.connector_operations.filter(s=>!Z||s.connector_key===Z),re=o.connections?.find(s=>s.id===Number(E))?.connector_key,ce=o.connector_operations.filter(s=>s.connector_key===re),fe=c.agent.filter(s=>s.resource_class==="connector_action"),ye=c.floor.filter(s=>s.resource_class==="connector_action"&&ee(s)),Me={connector_key:p.startsWith("connector:")?p.slice(10):null,connection_id:p.startsWith("connection:")?Number(p.slice(11)):null,operation_key:P==="specific"?T:null,operation_category:P.startsWith("category:")?P.slice(9):null},G=fe.find(s=>$(s)&&se(s)==="all"&&!s.operation_key&&!s.operation_category),ve=fe.filter(s=>s!==G&&ee(s)),je=(s,v=!1)=>{const z=new Map;for(const _ of s){const f=se(_),j=z.get(f);j?j.push(_):z.set(f,[_])}return[...z].sort(([_],[f])=>_==="all"?-1:f==="all"?1:_.localeCompare(f)).map(([_,f])=>e.jsxs("details",{open:_==="all"||_===x,className:"group rounded-lg border",children:[e.jsxs("summary",{className:"flex cursor-pointer list-none items-center gap-2 px-3 py-3 text-sm font-medium [&::-webkit-details-marker]:hidden",children:[e.jsx("span",{"aria-hidden":"true",className:"transition-transform group-open:rotate-90",children:"›"}),e.jsx("span",{className:"min-w-0 flex-1 break-words",children:Be(f[0],o)}),e.jsxs("span",{className:"shrink-0 text-xs font-normal text-muted-foreground",children:[f.length," ",f.length===1?"rule":"rules"]})]}),e.jsx("div",{className:"divide-y border-t",children:f.map(j=>{const le=!v&&$(j);return e.jsxs(he,{controls:e.jsxs(e.Fragment,{children:[e.jsx(ne,{options:ue,value:j.effects.execute??"approval",floor:"auto",compact:!0,disabled:d||!le,ariaLabel:`Policy for ${$e(j,o)}`,onChange:Ue=>void I(j,Ue)}),le&&e.jsx(Te,{label:"Remove",disabled:d,ariaLabel:`Remove rule ${j.id}: ${$e(j,o)}`,onRemove:()=>I(j)})]}),children:[e.jsx("p",{className:"text-sm break-words",children:Qe(j,o)}),!le&&e.jsx("p",{className:"text-xs text-muted-foreground",children:j.principal_kind==="agent"&&!j.principal_id?"All agents":"Inherited restriction"})]},j.id)})})]},`${x}:${_}`))};return e.jsxs("div",{className:"space-y-4",children:[(x!==X||l!==u)&&e.jsx("p",{role:"status",className:"text-sm text-muted-foreground",children:"The requested scope is unavailable. Showing organization rules; install the connector or choose an available scope."}),e.jsxs("div",{className:"space-y-1 text-sm text-muted-foreground",children:[e.jsx("p",{children:"Auto runs immediately. Ask waits for human approval. Block prevents execution and hides the action from agents. Authentication and guardrails still apply."}),e.jsxs("details",{className:"space-y-2",children:[e.jsx("summary",{className:"cursor-pointer text-sm font-medium text-foreground",children:"How rules combine"}),e.jsx("p",{children:"A rule overrides another when it is narrower in target or actions and at least as narrow in the other. When rules are narrower in different ways, or use different categories, the stricter choice wins: Block, then Ask, then Auto. With no matching rule, the result is Ask. Impact categories apply only to writes."}),e.jsx("p",{children:"A connection-wide Auto does not override an organization-wide destructive Block. Add a destructive rule for that connection to make an exception."}),e.jsx("p",{children:"Agents and their Automations can only tighten organization policy. Internal browser steps inherit the parent approval; an explicit browser Block still wins."})]})]}),e.jsxs(L,{label:"Policy owner",value:l,onChange:N,disabled:d,children:[e.jsx("option",{value:"",children:"Organization"}),o.agents.map(s=>e.jsxs("option",{value:s.id,children:["Agent: ",s.name]},s.id))]}),l&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"Auto adds no restriction for this agent. It inherits organization policy and cannot bypass Ask or Block."}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-sm font-medium",children:l?"Default restriction":"Default"}),e.jsx("div",{className:"rounded-lg border",children:e.jsxs(he,{controls:e.jsxs(e.Fragment,{children:[e.jsx(ne,{options:ue,value:G?.effects.execute??(l?"auto":"approval"),floor:"auto",compact:!0,disabled:d,ariaLabel:l?"Agent default":"Organization default",onChange:s=>void I(yt,s)}),G&&e.jsx(Te,{label:"Reset default",disabled:d,onRemove:()=>I(G)},G.id)]}),children:[e.jsx("p",{className:"text-sm",children:"All connectors · All actions"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:l?"Auto inherits organization policy. Ask or Block adds a restriction.":"Applies when no more specific rule matches."})]})})]}),e.jsx(L,{label:"Show rules for",value:x,onChange:Q,disabled:d,children:e.jsx(Ee,{catalog:o})}),l&&ye.length>0&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-sm font-medium",children:"Inherited organization rules"}),je(ye,!0)]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("h3",{className:"text-sm font-medium",children:l?"Agent exceptions":"Exceptions"}),!M&&e.jsx(C,{variant:"outline",size:"sm",disabled:d,onClick:()=>{B(x),V("approval"),K("all"),U(""),O(!0)},children:"Add exception"})]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[x==="all"?"Expand a group to edit its rules.":"Includes organization-wide and connector-wide rules."," ","Use all actions or a category to cover current and future actions."]}),ve.length?je(ve):e.jsx("p",{className:"text-sm text-muted-foreground",children:l?"No additional rules in this scope. The default restriction and organization policy apply.":"No exceptions in this scope. The default applies."})]}),M&&e.jsxs("form",{className:"space-y-3 border-t pt-4",onSubmit:s=>{s.preventDefault(),!d&&(P!=="specific"||T)&&I(Me,F).then(v=>{v&&(O(!1),Q(se(v)))})},children:[e.jsx("h3",{className:"text-sm font-medium",children:"Add exception"}),e.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[e.jsx(L,{label:"Applies to",value:p,onChange:s=>{B(s),K("all"),U("")},disabled:d,children:e.jsx(Ee,{catalog:o})}),e.jsxs(L,{label:"Actions",value:P,onChange:K,disabled:d,children:[e.jsx("option",{value:"all",children:"All actions"}),e.jsx("optgroup",{label:"Categories",children:o.operation_categories?.map(s=>e.jsx("option",{value:`category:${s}`,children:qe[s]},s))}),e.jsx("option",{value:"specific",children:"Specific action"})]})]}),P==="specific"&&e.jsxs(L,{label:"Specific action",value:T,onChange:U,disabled:d,children:[e.jsx("option",{value:"",children:"Choose action"}),oe.map(s=>e.jsxs("option",{value:s.operation_key,children:[s.connector_name,": ",s.name]},s.operation_key))]}),e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[e.jsx(ne,{options:ue,value:F,floor:"auto",compact:!0,disabled:d,ariaLabel:"New rule decision",onChange:V}),e.jsx(Ye,{onCancel:()=>O(!1),cancelDisabled:d,children:e.jsx(C,{type:"submit",disabled:d||P==="specific"&&!T,children:d?"Saving…":"Save rule"})})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Saving an existing scope replaces its decision. Removing a rule reveals the next matching rule."})]}),H&&e.jsx("p",{role:"alert",className:"text-sm text-destructive",children:H}),e.jsxs("div",{className:"space-y-3 border-t pt-4",children:[e.jsx("h3",{className:"text-sm font-medium",children:"Check an action"}),e.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[e.jsxs(L,{label:"Check connection",value:E,onChange:s=>{ae(s),J("")},children:[e.jsx("option",{value:"",children:"Choose connection"}),o.connections?.map(s=>e.jsxs("option",{value:String(s.id),children:[s.display_name||s.connector_key," (#",s.id,")"]},s.id))]}),e.jsxs(L,{label:"Check action",value:R,onChange:J,disabled:!E,children:[e.jsx("option",{value:"",children:"Choose action"}),ce.map(s=>e.jsx("option",{value:s.operation_key.slice(s.connector_key.length+2),children:s.name},s.operation_key))]})]}),w.error?e.jsxs("p",{role:"alert",className:"text-sm text-destructive",children:["Could not check policy. ",String(w.error)]}):e.jsx("p",{"aria-live":"polite",className:"text-sm",children:R?w.isPending?"Checking…":w.data?e.jsxs(e.Fragment,{children:[e.jsx("strong",{children:Ze[w.data.effect]})," ·"," ",xt[w.data.reason]??"The server evaluated this action.",w.data.rule_ids.length>0?` · Rules ${w.data.rule_ids.map(s=>`#${s}`).join(", ")}`:""]}):"":""})]})]})}const jt=[{action:"create_type",label:"Create entity types",description:"Add a new type and its initial fields."},{action:"update_type",label:"Edit entity types",description:"Change fields, write rules, event kinds, or type metadata."},{action:"delete_type",label:"Delete entity types",description:"Remove an entity-type definition."}],bt=[{action:"create_relationship_type",label:"Create relationship types",description:"Add a new kind of link between entity types."},{action:"update_relationship_type",label:"Edit relationship types",description:"Change a definition, or which types it may connect."},{action:"delete_relationship_type",label:"Delete relationship types",description:"Remove a relationship-type definition."}];function xe(t){return t.resource_class==="entity_schema"&&t.principal_kind===null&&t.entity_type_slug===null&&t.operation_key===null&&t.target_agent_id===null}function Nt(t){return t.agent.find(xe)}function _t(t,i){return{...t,agent:[...t.agent.filter(a=>!xe(a)),i]}}function Ct(t){return{...t,agent:t.agent.filter(i=>!xe(i))}}function kt({label:t,description:i,action:a,value:r,pending:m,onChange:u}){return e.jsxs(he,{controls:e.jsx(ne,{options:st("entity_schema",a),value:r,floor:"auto",disabled:m,compact:!0,ariaLabel:t,onChange:u}),children:[e.jsx("p",{children:t}),e.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:i})]})}function Fe({title:t,actions:i,effects:a,pending:r,onChange:m}){return e.jsxs("section",{className:"space-y-2",children:[e.jsx("h3",{className:"text-sm font-medium",children:t}),e.jsx("div",{className:"divide-y overflow-hidden rounded-lg border",children:i.map(({action:u,label:N,description:A})=>e.jsx(kt,{action:u,label:N,description:A,value:a[u]??pe.entity_schema[u]??"deny",pending:r,onChange:o=>m(u,o)},u))})]})}function St({owner:t}){const i=ge(),a=Je(t),r=Ie(t),m=be({mutationFn:n=>De(t,{resource_class:"entity_schema",effects:n}),onSuccess:n=>{i.setQueryData(a,g=>g&&_t(g,n)),i.invalidateQueries({queryKey:a})},onError:n=>{ie.error(n instanceof Error?n.message:"Failed to save schema policy")}}),u=be({mutationFn:()=>Le(t,{resource_class:"entity_schema"}),onSuccess:()=>{i.setQueryData(a,n=>n&&Ct(n)),i.invalidateQueries({queryKey:a})},onError:n=>{ie.error(n instanceof Error?n.message:"Failed to reset schema policy")}});if(r.isLoading)return e.jsx(me,{label:"schema policy",variant:"cards",cards:1});if(r.isError||!r.data)return e.jsx(et,{label:"schema policy"});const N=Nt(r.data),A=N?.effects??pe.entity_schema,o=m.isPending||u.isPending,l=(n,g)=>{m.mutate({...N?.effects??pe.entity_schema,[n]:g})};return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:N?"Custom policy":"Workspace defaults"}),N?e.jsxs(C,{type:"button",variant:"outline",size:"sm",disabled:o,onClick:()=>u.mutate(),children:[e.jsx(tt,{className:"mr-1.5 h-3.5 w-3.5"}),"Remove custom policy"]}):null]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(Fe,{title:"Entity types",actions:jt,effects:A,pending:o,onChange:l}),e.jsx(Fe,{title:"Relationship types",actions:bt,effects:A,pending:o,onChange:l})]})]})}function Re(t){return t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function At(t,i,a){const r=t.split("/");return r[1]===i?(r[1]=a,r.join("/")||"/"):`/${a}`}function wt({owner:t,connector:i,connection:a,agent:r}){const m=nt(),u=ge(),{data:N,error:A}=We(),{activeOrg:o,urlOrgSlug:l}=it(),n=(N??[]).find(c=>c.slug===t&&c.is_member)??null,g=n?.id??t,k=at(g,{name:n?.name??"",slug:n?.slug??"",visibility:n?.visibility??"private"}),[B,X]=k.field("name"),[Q,M]=k.field("slug"),[O,T]=k.field("visibility"),[U,P]=te(g,!!n),[K,F]=te(g,!1),[V,d]=te(g,null),[W,H]=b.useState(!1),[q,Y]=b.useState(!1),[ae,R]=te(g,!1);if(ot(A)&&N===void 0)return e.jsxs(we,{role:"alert",children:[e.jsx(ze,{children:e.jsx(Oe,{children:"Couldn't load organizations"})}),e.jsx(Pe,{children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"Please try again in a moment."})})]});if(N===void 0)return e.jsxs("div",{className:"max-w-2xl space-y-6",children:[e.jsx(me,{label:"organization",variant:"cards",cards:1}),e.jsx(me,{label:"visibility",variant:"panel"})]});if(!n)return e.jsxs(we,{children:[e.jsx(ze,{children:e.jsx(Oe,{children:"Organization not found"})}),e.jsx(Pe,{children:e.jsxs("p",{className:"text-sm text-muted-foreground",children:["You aren't a member of an organization at"," ",e.jsx("span",{className:"font-mono",children:t}),", or it has been deleted."]})})]});const J=c=>{const S=pt(c);if(S.kind==="cross-host"){window.location.assign(S.href);return}m({to:S.to})},E=c=>{if(c==="public"&&n.visibility!=="public"){F(!0);return}T(c),F(!1)},w=async()=>{if(!k.canSubmit)return;const c=B.trim();if(!c){d("Name is required");return}const S=Q.trim()||Re(c);if(!S){d("Slug is required");return}H(!0),d(null);try{const p=c!==n.name||S!==n.slug,x=O!==n.visibility;let h=n.slug;if(p){const $=await de.update({organizationId:n.id,data:{name:c,slug:S}});if($.error){d($.error.message||"Failed to update organization");return}h=$.data?.slug??S}x&&(h=(await ut(h,O)).slug),(p||x)&&(k.accept(k.values,{name:c,slug:h,visibility:O}),await u.invalidateQueries({queryKey:["organizations"]}),ie.success("Organization updated"));const D=o?.id===n.id||l===n.slug,ee=h!==n.slug;if(D&&ee){const $=ke(),Z=Se();if($===n.slug&&Z){const re=mt(window.location.pathname,n.slug)||"/",ce=`${window.location.protocol}//${h}.${Z}${re}${window.location.search}${window.location.hash}`;window.location.assign(ce);return}const oe=At(window.location.pathname,n.slug,h);m({to:`${oe}${window.location.search}${window.location.hash}`});return}}catch(p){d(p instanceof Error?p.message:"Failed to update organization")}finally{H(!1)}},I=async()=>{Y(!0),d(null);try{const c=await de.delete({organizationId:n.id});if(c.error){d(c.error.message||"Failed to delete organization");return}await u.invalidateQueries({queryKey:["organizations"]}),ie.success("Organization deleted");const p=(N??[]).filter(h=>h.is_member).find(h=>h.id!==n.id)??null,x=o?.id===n.id||l===n.slug;if(x&&p){await de.setActive({organizationId:p.id}),J(p.slug);return}if(x){const h=ke(),D=Se();if(h===n.slug&&D){window.location.assign(`${window.location.protocol}//app.${D}/`);return}m({to:"/"});return}m({to:"/"})}catch(c){d(c instanceof Error?c.message:"Failed to delete organization")}finally{Y(!1),R(!1)}},y=W||q;return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("section",{className:"space-y-4",children:[e.jsx("h2",{className:"text-base font-semibold leading-none",children:"Identity"}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(Ne,{htmlFor:"org-name",children:"Name"}),e.jsx(_e,{id:"org-name",value:B,onChange:c=>{X(c.target.value),U||M(Re(c.target.value))},placeholder:"e.g. My Team",disabled:y})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(Ne,{htmlFor:"org-slug",children:"Slug"}),e.jsx(_e,{id:"org-slug",value:Q,onChange:c=>{P(!0),M(c.target.value)},placeholder:"e.g. my-team",disabled:y}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Changing the slug rewrites this workspace's URL. Existing links to"," ",e.jsxs("span",{className:"font-mono",children:["/",n.slug]})," redirect for a grace period."]})]})]}),e.jsxs("section",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-base font-semibold leading-none",children:"Workspace visibility"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Choose who can browse this workspace and its public pages."})]}),e.jsxs("div",{className:"grid gap-2 sm:grid-cols-2",children:[e.jsxs("button",{type:"button",onClick:()=>E("private"),disabled:y,className:`flex items-start gap-3 rounded-lg border p-3 text-left transition-colors ${O==="private"?"border-primary bg-primary/5":"border-border hover:bg-muted/40"}`,children:[e.jsx(rt,{className:"mt-0.5 h-4 w-4 shrink-0"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-medium",children:"Private"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Only members can access this workspace."})]})]}),e.jsxs("button",{type:"button",onClick:()=>E("public"),disabled:y,className:`flex items-start gap-3 rounded-lg border p-3 text-left transition-colors ${O==="public"?"border-primary bg-primary/5":"border-border hover:bg-muted/40"}`,children:[e.jsx(ct,{className:"mt-0.5 h-4 w-4 shrink-0"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-medium",children:"Public"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Anyone can browse public pages for this workspace."})]})]})]}),K&&e.jsxs("div",{className:"rounded-md border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-sm",children:[e.jsx("p",{className:"text-foreground",children:"Make this workspace public? Catalog-style content may become visible outside the membership."}),e.jsxs("div",{className:"mt-2 flex gap-2",children:[e.jsx(C,{type:"button",size:"sm",onClick:()=>{T("public"),F(!1)},disabled:y,children:"Confirm public"}),e.jsx(C,{type:"button",size:"sm",variant:"ghost",onClick:()=>F(!1),disabled:y,children:"Cancel"})]})]})]}),V&&e.jsx("div",{className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:V}),e.jsx(lt,{visible:k.hasConflict,onReload:k.reset}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(C,{variant:"outline",onClick:()=>void m({to:`/${t}`}),disabled:y,children:"Cancel"}),e.jsxs(C,{onClick:w,disabled:y||!k.canSubmit,children:[W?e.jsx(Ce,{size:"lg",className:"mr-1.5"}):null,W?"Saving...":"Save changes"]})]}),e.jsxs("section",{id:"policies",className:"scroll-mt-6 space-y-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h2",{className:"text-sm font-medium",children:"Policies"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Control connector actions across the organization. Changes to existing rules save automatically."})]}),e.jsx(vt,{owner:t,connector:i,connection:a,agent:r},`${t}:${r??""}:${i??""}:${a??""}`)]}),e.jsxs("section",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h2",{className:"text-sm font-medium",children:"Agent write defaults"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Set the defaults agents inherit for entities and agents. Changes save automatically; agents can only tighten them."})]}),e.jsx(gt,{owner:t,variant:"org-floor"})]}),e.jsxs("section",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h2",{className:"text-sm font-medium",children:"Schema governance"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Control structural changes by agents and connected AI clients. Changes save automatically."})]}),e.jsx(St,{owner:t})]}),e.jsxs("div",{className:"rounded-lg border border-destructive/30 bg-destructive/5 p-4",children:[e.jsx("p",{className:"text-sm font-medium",children:n.is_personal?"Personal workspace":"Delete this organization"}),e.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:n.is_personal?"Your personal workspace can't be deleted — your devices and personal connections are bound to it.":"Permanently removes the organization and all members' workspace access. This cannot be undone."}),!n.is_personal&&e.jsx("div",{className:"mt-3",children:ae?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(C,{variant:"destructive",size:"sm",onClick:I,disabled:y,children:[q?e.jsx(Ce,{className:"mr-1.5"}):null,"Confirm delete"]}),e.jsx(C,{variant:"ghost",size:"sm",onClick:()=>R(!1),disabled:y,children:"Cancel"})]}):e.jsxs(C,{variant:"outline",size:"sm",className:"text-destructive hover:text-destructive",onClick:()=>R(!0),disabled:y,children:[e.jsx(dt,{className:"mr-1.5 h-3.5 w-3.5"}),"Delete organization"]})})]})]})}function $t(){const{owner:t}=Ae.useParams(),i=Ae.useSearch(),{data:a}=We(),r=(a??[]).find(m=>m.slug===t&&m.is_member)?.name;return e.jsxs("div",{className:"mx-auto flex w-full max-w-4xl flex-1 flex-col gap-6 px-4 py-6 lg:px-6",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ht,{className:"h-7 w-7"}),e.jsx("h1",{className:"text-3xl font-semibold leading-tight",children:"Organization settings"})]}),r?e.jsx("p",{className:"text-base font-medium text-foreground",children:r}):null]}),e.jsx(wt,{owner:t,...i})]})}export{$t as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const t=new Map;function d(e,n,s){const i=n.trim();i&&t.set(e,{text:i,executionTarget:s})}function o(e){const n=t.get(e);return n===void 0?null:(t.delete(e),n)}export{d as s,o as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e6 as w,dA as f,dB as y,r as N,j as e,bD as k,B as d,a6 as A,dY as C}from"./index-B2AmRqYh.js";import{u as P}from"./runs-oHveuEUB.js";function B({resource:g,runId:t,children:h,onDone:l}){const c=!!t,{data:a,isLoading:E,isError:u,refetch:v}=P(g,c?t:void 0),s=w({isReview:c,isError:u,status:a?.status}),m=a?.status==="pending"?a.proposal:null,n=f(),i=y(),[p,x]=N.useState(""),o=n.isPending||i.isPending,j=s==="active"||s==="loading"||s==="error",b=()=>{t&&n.mutate({run_id:t},{onSuccess:()=>l?.()})},R=()=>{if(!t)return;const r=p.trim();i.mutate({run_id:t,...r?{reason:r}:{}},{onSuccess:()=>l?.()})};return e.jsxs("div",{className:"grid content-start gap-4",children:[s==="active"?e.jsx("div",{className:"rounded-lg border border-amber-200 bg-amber-50 p-3 text-sm text-amber-950 dark:border-amber-900/60 dark:bg-amber-950/30 dark:text-amber-100",children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx(k,{className:"mt-0.5 h-4 w-4 shrink-0"}),e.jsxs("p",{children:["Review the change the builder agent proposed. The values below show the proposed change — ",e.jsx("strong",{children:"Approve"})," to apply, or"," ",e.jsx("strong",{children:"Reject"}),"."]})]})}):null,s==="gone"?e.jsx("div",{className:"rounded-lg border bg-muted/30 p-3 text-sm text-muted-foreground",children:"This change is no longer pending (it may have been approved or rejected already)."}):null,s==="error"?e.jsx("div",{className:"rounded-lg border border-destructive/40 bg-destructive/5 p-3 text-sm",children:e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsx("p",{className:"text-destructive",children:"Couldn't load the proposed change to review. Editing is disabled until it loads — retry, or reopen the link."}),e.jsx(d,{type:"button",variant:"outline",size:"sm",onClick:()=>void v(),children:"Retry"})]})}):null,h({reviewMode:s,proposal:m,controlsDisabled:j}),s==="active"?e.jsxs("div",{className:"grid gap-3",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(A,{htmlFor:"review-reject-reason",children:"Reason (optional)"}),e.jsx(C,{id:"review-reject-reason",rows:2,value:p,onChange:r=>x(r.target.value),placeholder:"Why you're rejecting — shared back to the requester.",disabled:o})]}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:justify-end",children:[e.jsx(d,{type:"button",variant:"outline",onClick:R,disabled:o,children:i.isPending?"Rejecting...":"Reject"}),e.jsx(d,{type:"button",onClick:b,disabled:o,children:n.isPending?"Approving...":"Approve"})]})]}):null]})}export{B as P};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ai as v,r as a,j as e,L as h,aj as j,ac as y,ak as N}from"./index-B2AmRqYh.js";import{C as k,a as C,b as S,c as L}from"./card-CMmh2mzo.js";function R(){const{token:n,error:x}=v.useSearch(),[o,p]=a.useState(""),[i,f]=a.useState(""),[d,s]=a.useState(null),[l,c]=a.useState(!1),[u,g]=a.useState(!1),w=async t=>{if(t.preventDefault(),!n){s("This reset link is invalid or expired.");return}if(o.length<8){s("Password must be at least 8 characters.");return}if(o!==i){s("Passwords do not match.");return}c(!0),s(null);try{const r=await j(`${y}/api/auth/reset-password`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({token:n,newPassword:o})});if(!r.ok)throw await N(r);g(!0)}catch(r){s(r instanceof Error?r.message:"Failed to reset password")}finally{c(!1)}},b=!n||x==="INVALID_TOKEN",m={callbackUrl:void 0,mode:void 0,error:void 0,errorDescription:void 0,loginHint:void 0,invitationOrg:void 0,intent:void 0};return e.jsx("div",{className:"min-h-[calc(100vh-3.5rem)] flex items-center justify-center",children:e.jsxs("div",{className:"w-full max-w-md p-8",children:[e.jsx("img",{src:"/lobu-logo.svg",alt:"Lobu",className:"mx-auto mb-6 h-8 w-auto"}),e.jsxs(k,{children:[e.jsx(C,{children:e.jsx(S,{asChild:!0,children:e.jsx("h1",{className:"text-center text-2xl",children:"Reset your password"})})}),e.jsx(L,{children:b&&!u?e.jsxs("div",{className:"mt-6 space-y-4 text-center",children:[e.jsx("p",{className:"text-sm text-destructive",children:"This reset link is invalid or expired."}),e.jsx(h,{to:"/auth/login",search:m,className:"text-sm text-primary hover:underline",children:"Back to sign in"})]}):u?e.jsxs("div",{className:"mt-6 space-y-4 text-center",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Your password has been reset successfully."}),e.jsx(h,{to:"/auth/login",search:m,className:"text-sm text-primary hover:underline",children:"Continue to sign in"})]}):e.jsxs("form",{onSubmit:w,className:"mt-6 space-y-4",children:[d&&e.jsx("div",{className:"p-3 text-sm text-destructive bg-destructive/10 rounded-lg",children:d}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"new-password",className:"block text-sm font-medium",children:"New password"}),e.jsx("input",{id:"new-password",type:"password",value:o,onChange:t=>p(t.target.value),minLength:8,required:!0,className:"mt-1 block h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"confirm-password",className:"block text-sm font-medium",children:"Confirm new password"}),e.jsx("input",{id:"confirm-password",type:"password",value:i,onChange:t=>f(t.target.value),minLength:8,required:!0,className:"mt-1 block h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring"})]}),e.jsx("button",{type:"submit",disabled:l,className:"flex h-10 w-full items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90 disabled:opacity-50",children:l?"Resetting password...":"Reset password"})]})})]})]})})}export{R as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{cw as s,cx as d,f3 as c,cy as l,aj as f,f4 as g}from"./index-B2AmRqYh.js";const y=30,_=new Set(["running","pending","claimed"]);function I(n){return"connectionId"in n?["connection",n.connectionId]:"deviceId"in n?["device",n.deviceId]:"connectorKey"in n?["connector",n.connectorKey]:["feed",n.feedId]}function m(n){return"connectionId"in n?{connection_ids:[n.connectionId]}:"deviceId"in n?{device_worker_id:n.deviceId}:"connectorKey"in n?{connector_key:n.connectorKey}:{feed_ids:[n.feedId]}}function v(n,t,i){return c({queryKey:["runs-infinite",i??null,n?I(n):null,t.runTypes??null,t.status??null],queryFn:async({pageParam:e})=>{const a=e;return l("manage_operations",{action:"list_runs",...m(n),...t.runTypes&&t.runTypes.length>0?{run_types:t.runTypes}:{},...t.status?{status:t.status}:{},...a?{before_id:a.before_id,before_created_at:a.before_created_at}:{},limit:y},i?{slug:i}:void 0)},initialPageParam:null,getNextPageParam:e=>{if(!e.has_more)return;const a=e.runs[e.runs.length-1];if(a)return{before_id:a.id,before_created_at:a.created_at}},refetchInterval:e=>(e.state.data?.pages??[]).some(o=>o.runs.some(u=>_.has(u.status)))?5e3:!1,enabled:!!n,staleTime:15e3})}function p(n,t){return n.kind==="agent"?n.agentId?`/${n.agentId}/config/pending/${t}`:null:n.agentId&&n.automationId?`/${n.agentId}/automations/${n.automationId}/pending/${t}`:null}function T(n,t){const{slug:i}=s(),e=t!=null?p(n,t):null,a=n.kind==="agent"?["agent",n.agentId]:["automation",n.agentId,n.automationId];return d({queryKey:["pending-proposal",i,...a,t],queryFn:async()=>{const r=await f(g(i,e),{credentials:"include"});if(r.status===404)return{status:"gone"};if(!r.ok)throw new Error(`Failed to fetch pending proposal: ${r.status}`);return{status:"pending",proposal:await r.json()}},enabled:!!i&&!!e&&!!t,staleTime:0,retry:!1})}export{v as a,T as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e,af as h,bR as T,bS as k,bT as w,bU as A,bV as C,S as l,r,n as I}from"./index-B2AmRqYh.js";import{a as P}from"./runs-oHveuEUB.js";import{R as E}from"./runs-table-BUKDjiBc.js";const f=[{value:"all",label:"All"},{value:"sync",label:"Sync",runTypes:["sync"]},{value:"action",label:"Action",runTypes:["action"]},{value:"auth",label:"Auth",runTypes:["auth"]}];function F(s){return f.find(t=>t.value===s)?.runTypes}const B=[{value:"all",label:"All statuses"},{value:"running",label:"Running"},{value:"completed",label:"Completed"},{value:"failed",label:"Failed"},{value:"pending",label:"Pending"}];function L({bucket:s,status:t,onBucketChange:a,onStatusChange:u}){return e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("div",{className:"inline-flex rounded-md border bg-muted/30 p-0.5 text-sm",children:f.map(n=>e.jsx("button",{type:"button",onClick:()=>a(n.value),className:h("rounded px-3 py-1 transition-colors",s===n.value?"bg-background text-foreground ":"text-muted-foreground hover:text-foreground"),children:n.label},n.value))}),e.jsxs(T,{value:t,onValueChange:u,children:[e.jsx(k,{className:"w-[150px]",children:e.jsx(w,{})}),e.jsx(A,{children:B.map(n=>e.jsx(C,{value:n.value,children:n.label},n.value))})]})]})}function M({labels:s,className:t}){return e.jsx("div",{className:h("inline-flex rounded-md border bg-muted/30 p-0.5 text-sm",t),children:s.map((a,u)=>e.jsx("span",{className:u===0?"rounded bg-background px-3 py-1 text-foreground ":"px-3 py-1 text-muted-foreground",children:a},a))})}function b({rows:s=6}){return e.jsxs("div",{className:"rounded-lg border",role:"status","aria-label":"Loading runs",children:[e.jsx("div",{className:"border-b px-3 py-2",children:e.jsx(l,{className:"h-3 w-1/4"})}),e.jsx("div",{className:"divide-y",children:Array.from({length:s}).map((t,a)=>e.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5",children:[e.jsx(l,{className:"h-3.5 w-3.5 rounded-full shrink-0"}),e.jsx(l,{className:"h-3 w-20"}),e.jsx(l,{className:"h-3 w-16"}),e.jsx(l,{className:"ml-auto h-3 w-12 shrink-0"}),e.jsx(l,{className:"h-7 w-7 rounded-md shrink-0"})]},a))})]})}function _({rows:s=6}){return e.jsxs("div",{className:"space-y-4",role:"status","aria-label":"Loading runs",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(M,{labels:["All","Sync","Action","Auth"]}),e.jsx("div",{className:"h-9 w-[150px] rounded-md border border-input"})]}),e.jsx(b,{rows:s})]})}function K({scope:s,ownerSlug:t}){const[a,u]=r.useState("all"),[n,v]=r.useState("all"),j=r.useMemo(()=>({runTypes:F(a),status:n==="all"?void 0:n}),[a,n]),{data:i,isLoading:N,isError:y,hasNextPage:o,isFetchingNextPage:d,fetchNextPage:x}=P(s,j,t),m=r.useMemo(()=>i?.pages.flatMap(c=>c.runs)??[],[i]),S={runType:a==="all",feed:!0,connection:"deviceId"in s||"connectorKey"in s},p=r.useRef(null);return r.useEffect(()=>{const c=p.current;if(!c||!o)return;const g=new IntersectionObserver(R=>{R[0]?.isIntersecting&&!d&&x()},{rootMargin:"200px"});return g.observe(c),()=>g.disconnect()},[o,d,x]),e.jsxs("div",{className:"space-y-3",children:[e.jsx(L,{bucket:a,status:n,onBucketChange:u,onStatusChange:v}),N?e.jsx(b,{}):y?e.jsx("p",{className:"rounded-lg border bg-destructive/5 px-3 py-6 text-center text-xs text-destructive",children:"Failed to load runs."}):m.length===0?e.jsx("p",{className:"rounded-lg border bg-muted/20 px-3 py-6 text-center text-xs text-muted-foreground",children:"No runs yet."}):e.jsxs(e.Fragment,{children:[e.jsx(E,{runs:m,ownerSlug:t,columns:S}),e.jsx("div",{ref:p,className:"h-1"}),d&&e.jsx("div",{className:"flex justify-center py-3",children:e.jsx(I,{size:"lg",className:"text-muted-foreground"})})]})]})}export{K as R,_ as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e,af as g,o as v,eM as w,S as f,eN as k,i as C,eO as B,bk as F,eP as O,B as S,L as j,P as D,x as T,dj as H,aO as $,cZ as U,cM as q,cN as z,cO as M,eQ as W,eR as K,eS as X,eT as Y,eU as _,eV as u,eW as G,eX as x,en as J,ab as Q,eY as Z,ei as ee,aw as te,n as se,bH as ne,r as L,cp as R,cq as A,ct as E}from"./index-B2AmRqYh.js";import{c as ae}from"./connection-label-BobuYiAG.js";const re={amber:"bg-amber-500",muted:"bg-muted-foreground/40",destructive:"bg-destructive"};function V({tone:t}){return e.jsx("span",{"aria-hidden":t===null,className:g("h-1.5 w-1.5 shrink-0 rounded-full",t===null?"bg-transparent":re[t])})}function I(t){switch(t.attention){case"needs_auth":return"Needs authentication";case"setup_required":return t.attention_reason?.trim()||"Setup required";case"paused":return"Paused";case"misconfigured":return"Configuration error";case"device_offline":return`Waiting for ${t.device_label||t.device_platform||"device"}`;case"last_attempt_failed":{const n=Number(t.consecutive_failures??0);return t.last_error?.trim()||(n>0?`${n} consecutive sync ${n===1?"failure":"failures"}`:"Last sync failed")}case"overdue":return"Scheduled run overdue";case"no_trigger":return"No schedule — this feed only runs when you sync it";case"never_run":return t.execution_mode==="scheduled"?"Scheduled, not run yet":"Not synced yet";default:return null}}function ie(t){switch(t.attention){case"last_attempt_failed":case"misconfigured":return"destructive";case"needs_auth":case"setup_required":case"device_offline":case"overdue":case"no_trigger":case"never_run":return t.attention==="never_run"&&t.execution_mode!=="scheduled"?"muted":"amber";case"paused":return"muted";default:return t.status==="active"?null:t.status==="error"?"destructive":"muted"}}function ce(t){return Object.keys(t?.feeds_schema??{}).length>0}const y=new Set(["error","revoked","pending_auth"]),oe={pending_auth:"needs reconnect",revoked:"revoked",error:"error",paused:"paused",active:"active"};function _e({connections:t,connectorDef:n,organizationId:r,ownerSlug:c,connectorKey:s,isLoading:a=!1}){const d=v(),i=t.filter(m=>y.has(m.status)||!!n&&w(n)&&!m.device_worker_id).length;if(a)return e.jsx(f,{className:"h-16 w-full rounded-lg"});const l=t.length;return e.jsx(k,{title:"Connections",summary:`${l} ${l===1?"connection":"connections"}${i?` · ${i} ${i===1?"needs":"need"} attention`:""}`,onOpen:()=>d?.open({href:"",title:"Connections",connectorPanel:{section:"connections",connectorKey:s,organizationId:r,ownerSlug:c}})})}function ve({connections:t,connectorDef:n,ownerSlug:r,connectorKey:c}){if(t.length===0)return null;const s=[...t].sort((a,d)=>{const i=y.has(a.status)?0:1,l=y.has(d.status)?0:1;return i-l});return e.jsx("ul",{className:"flex flex-col gap-2",children:s.map(a=>{const d=ae({...a,connector_name:a.connector_name??n?.name??null}),i=!!n&&w(n)&&!a.device_worker_id,l=a.status==="error"||a.status==="revoked"||a.status==="pending_auth";return e.jsx("li",{children:e.jsxs(j,{to:"/$owner/connectors/$connectorKey/$connectionId",params:{owner:r,connectorKey:c,connectionId:String(a.id)},search:{},className:"flex items-center justify-between gap-3 rounded-lg border border-border px-3 py-2.5 transition-colors hover:bg-accent/50",children:[e.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-2",children:[e.jsx(V,{tone:a.status==="active"?null:a.status==="error"||a.status==="revoked"?"destructive":"amber"}),e.jsx("span",{className:"min-w-0 truncate text-sm font-medium",children:d})]}),e.jsxs("span",{className:"flex min-w-0 max-w-1/2 shrink-0 items-center gap-2",children:[i?e.jsx("span",{className:"shrink-0 text-xs text-amber-600",children:"Needs a device"}):l?e.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:a.error_message?.trim()||oe[a.status]||a.status}):null,e.jsx(H,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted-foreground"})]})]})},a.id)})})}function we({connection:t,ownerSlug:n,connectorKey:r,connectorDef:c}){const{data:s=[],isLoading:a}=C(t.id),d=ce(c),i=t.facets?.chat??!1,{inspectFeed:l}=B(),m=c?.feeds_schema??{},p={owner:n,connectorKey:r,connectionId:String(t.id)};return a?e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(f,{className:"h-12 w-full rounded-lg"}),e.jsx(f,{className:"h-12 w-full rounded-lg"})]}):s.length===0?e.jsx(F,{icon:O,title:i?"No channels":"No feeds",description:d?i?"Bind a channel to route conversations to this connection.":"Add a feed to start collecting data from this connection.":i?"This chat connection has no bound channels yet.":"This connector doesn't provide any feeds.",children:d?e.jsx(S,{asChild:!0,size:"sm",children:e.jsxs(j,{to:"/$owner/connectors/$connectorKey/$connectionId",params:p,search:{addFeed:!0},children:[e.jsx(D,{className:"h-3.5 w-3.5"}),i?"Add channel":"Add feed"]})}):null}):e.jsx("ul",{className:"flex flex-col gap-2",children:s.map(o=>{const h=o.display_name?.trim()||o.feed_key,b=I(o),N=m[o.feed_key],P=`/${n}/connectors/${r}/${t.id}?feedId=${o.id}`;return e.jsx("li",{children:e.jsxs("button",{type:"button",onClick:()=>{N&&l(o.feed_key,N,P)},className:"flex w-full items-center justify-between gap-3 rounded-lg border border-border px-3 py-2.5 text-left transition-colors hover:bg-accent/50",children:[e.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[e.jsx(V,{tone:ie(o)}),e.jsx("span",{className:"min-w-0 truncate text-sm font-medium",children:h})]}),e.jsx("span",{className:o.attention==="last_attempt_failed"||o.attention==="misconfigured"?"max-w-[50%] shrink-0 text-right text-xs text-destructive":o.attention&&o.attention!=="healthy"?"max-w-[50%] shrink-0 text-right text-xs text-amber-600 dark:text-amber-400":"shrink-0 text-xs text-muted-foreground",title:b??void 0,children:b??(o.store==="channel_messages"?"chat channel":o.operations.includes("read")&&o.operations.includes("sync")?"synced + live":o.operations.includes("read")?"live":o.last_sync_at?`synced ${T(o.last_sync_at)}`:"not synced yet")})]})},o.id)})})}function ke({connection:t,ownerSlug:n,title:r}){const c=v(),{data:s=[],isLoading:a,isError:d}=C(t.id),i=s.filter(h=>["needs_auth","setup_required","misconfigured","last_attempt_failed","device_offline","overdue"].includes(h.attention??"")),l=s.filter(h=>h.status==="paused").length,m=a?t.feed_count:s.length,p=t.facets?.chat?"channels":"feeds",o=a?`Loading ${p}…`:d?`Could not load ${p} — open to retry`:`${m} ${p}${i.length?` · ${i.length} need attention`:""}${l?` · ${l} paused`:""}`;return e.jsxs("div",{className:"space-y-2",children:[e.jsx(k,{title:r,summary:o,onOpen:()=>c?.open({href:"",title:t.facets?.chat?"Channels":"Feeds",connectorPanel:{section:"feeds",connectorKey:t.connector_key,connectionId:t.id,organizationId:t.organization_id,ownerSlug:n}})}),i.length>0&&e.jsxs("ul",{className:"space-y-1 text-xs text-destructive",children:[i.slice(0,3).map(h=>e.jsxs("li",{children:[h.display_name||h.feed_key,": ",I(h)]},h.id)),i.length>3&&e.jsxs("li",{children:[i.length-3," more sources need attention."]})]})]})}const le=$("inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium transition-colors",{variants:{status:{active:"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400",paused:"bg-yellow-100 text-yellow-700 dark:bg-yellow-900/30 dark:text-yellow-400",error:"bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400",pending:"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400",rejected:"bg-gray-100 text-gray-700 dark:bg-gray-900/30 dark:text-gray-400",default:"bg-gray-100 text-gray-700 dark:bg-gray-800 dark:text-gray-300"}},defaultVariants:{status:"default"}}),de=$("h-1.5 w-1.5 rounded-full",{variants:{status:{active:"bg-green-500",paused:"bg-yellow-500",error:"bg-red-500",pending:"bg-blue-500",rejected:"bg-gray-500",default:"bg-gray-500"}},defaultVariants:{status:"default"}});function ue({className:t,status:n,showDot:r=!0,children:c,...s}){return e.jsxs("span",{className:g(le({status:n}),t),...s,children:[r&&e.jsx("span",{className:de({status:n})}),c]})}function xe(t,n){switch(n.kind){case"connection":return K(t,n.id);case"feed":return W(t,n.id);case"run":return{to:"/$owner/events",params:{owner:t},search:{run_ids:String(n.id)}}}}function he({ownerSlug:t,scope:n,variant:r="outline",iconOnly:c=!1,label:s,className:a,title:d}){const i=xe(t,n),l=d??s??"View in memory",m=e.jsx(S,{asChild:!0,variant:r,size:c?"icon":"sm",className:g(c&&"h-7 w-7",a),children:e.jsxs(j,{to:i.to,params:i.params,search:i.search,children:[e.jsx(U,{className:g("h-3.5 w-3.5",!c&&"mr-1.5")}),!c&&(s??"View in memory")]})});return c?e.jsxs(q,{children:[e.jsx(z,{asChild:!0,children:m}),e.jsx(M,{children:l})]}):m}const me=new Set(["error","failed","revoked"]);function pe(t){return t==="active"?"active":t==="paused"?"paused":t==="pending"||t==="pending_auth"?"pending":me.has(t)?"error":"default"}function ge({status:t}){return t==="completed"?e.jsx(ee,{className:"h-3.5 w-3.5 text-green-500"}):t==="failed"?e.jsx(te,{className:"h-3.5 w-3.5 text-destructive"}):t==="running"?e.jsx(se,{className:"text-blue-500"}):e.jsx(ne,{className:"h-3.5 w-3.5 text-muted-foreground"})}function fe({error:t}){const[n,r]=L.useState(!1);return t.length>80?e.jsxs(R,{open:n,onOpenChange:r,children:[e.jsx(A,{asChild:!0,children:e.jsx("button",{type:"button",className:"text-left text-destructive truncate max-w-[200px] hover:underline",children:t})}),e.jsx(E,{className:"w-96 max-h-64 overflow-auto",children:e.jsx("pre",{className:"text-xs whitespace-pre-wrap break-words text-destructive",children:t})})]}):e.jsx("span",{className:"text-destructive",children:t})}function ye({checkpoint:t}){const[n,r]=L.useState(!1);return e.jsxs(R,{open:n,onOpenChange:r,children:[e.jsx(A,{asChild:!0,children:e.jsx("button",{type:"button",className:"text-left text-muted-foreground hover:underline",children:"view"})}),e.jsx(E,{className:"w-80 max-h-64 overflow-auto",children:e.jsx("pre",{className:"text-xs whitespace-pre-wrap break-words",children:JSON.stringify(t,null,2)})})]})}function je(t){return t.feed_display_name??t.feed_key??"—"}function Ce({runs:t,ownerSlug:n,columns:r={}}){const c=t.some(s=>s.checkpoint);return e.jsx("div",{className:"rounded-lg border",children:e.jsxs(X,{children:[e.jsx(Y,{children:e.jsxs(_,{children:[e.jsx(u,{className:"text-xs py-1.5 px-3 w-8"}),e.jsx(u,{className:"text-xs py-1.5 px-3",children:"When"}),r.runType&&e.jsx(u,{className:"text-xs py-1.5 px-3",children:"Type"}),r.connection&&e.jsx(u,{className:"text-xs py-1.5 px-3",children:"Connection"}),r.feed&&e.jsx(u,{className:"text-xs py-1.5 px-3",children:"Feed"}),e.jsx(u,{className:"text-xs py-1.5 px-3",children:"Status"}),e.jsx(u,{className:"text-xs py-1.5 px-3",children:"Items"}),e.jsx(u,{className:"text-xs py-1.5 px-3",children:"Duration"}),e.jsx(u,{className:"text-xs py-1.5 px-3",children:"Version"}),c&&e.jsx(u,{className:"text-xs py-1.5 px-3",children:"Checkpoint"}),e.jsx(u,{className:"text-xs py-1.5 px-3",children:"Error"}),e.jsx(u,{className:"text-xs py-1.5 px-3 w-8"})]})}),e.jsx(G,{children:t.map(s=>{const a=s.completed_at?Math.round((new Date(s.completed_at).getTime()-new Date(s.created_at).getTime())/1e3):null;return e.jsxs(_,{children:[e.jsx(x,{className:"py-1.5 px-3",children:e.jsx(ge,{status:s.status})}),e.jsx(x,{className:"py-1.5 px-3 text-xs text-muted-foreground",title:J(s.created_at),children:T(s.created_at)}),r.runType&&e.jsx(x,{className:"py-1.5 px-3 text-xs",children:e.jsx(Q,{variant:"secondary",className:"font-mono text-[10px]",children:s.run_type??"—"})}),r.connection&&e.jsx(x,{className:"py-1.5 px-3 text-xs text-muted-foreground",children:s.connection_display_name??"—"}),r.feed&&e.jsx(x,{className:"py-1.5 px-3 text-xs text-muted-foreground",children:je(s)}),e.jsx(x,{className:"py-1.5 px-3 text-xs",children:e.jsx(ue,{status:pe(s.status),children:s.status})}),e.jsx(x,{className:"py-1.5 px-3 text-xs font-mono text-muted-foreground",children:s.items_collected??"—"}),e.jsx(x,{className:"py-1.5 px-3 text-xs text-muted-foreground",children:a!=null?Z(a):"—"}),e.jsx(x,{className:"py-1.5 px-3 text-xs font-mono text-muted-foreground",children:s.connector_version??"—"}),c&&e.jsx(x,{className:"py-1.5 px-3 text-xs",children:s.checkpoint?e.jsx(ye,{checkpoint:s.checkpoint}):e.jsx("span",{className:"text-muted-foreground",children:"—"})}),e.jsx(x,{className:"py-1.5 px-3 text-xs",children:s.error_message?e.jsx(fe,{error:s.error_message}):""}),e.jsx(x,{className:"py-1.5 px-3 text-right",children:e.jsx(he,{ownerSlug:n,scope:{kind:"run",id:s.id},variant:"ghost",iconOnly:!0,title:"View events from this run"})})]},s.id)})})]})})}export{ve as C,Ce as R,ue as S,he as V,_e as a,we as b,ce as c,ke as d,I as f,pe as g};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as O,j as t,aB as ae,ek as ne,ag as le,a6 as V,bR as oe,bS as de,bT as ce,bU as me,bV as ue,gc as fe,gd as R,ge as G,gf as xe,gg as _,gh as he,B as I,bu as Q,P as X,eS as be,eT as je,eU as z,eV as Z,eW as ye,eX as B,a7 as q,fY as ge,gi as Ne,cB as ve,cC as W,gj as pe,aL as we,af as T,dO as Se,x as $e,cM as Oe,cN as Ie,ab as Te,gk as Le,cO as Ae,cp as Ee,cq as ke,cP as Re,ct as Pe,cQ as C,cI as Ce}from"./index-B2AmRqYh.js";import{C as Fe}from"./calendar-DAiyi1ZL.js";var De="Separator",K="horizontal",_e=["horizontal","vertical"],re=O.forwardRef((s,r)=>{const{decorative:e,orientation:i=K,...a}=s,m=ze(i)?i:K,b=e?{role:"none"}:{"aria-orientation":m==="vertical"?m:void 0,role:"separator"};return t.jsx(ae.div,{"data-orientation":m,...b,...a,ref:r})});re.displayName=De;function ze(s){return _e.includes(s)}var ie=re;function E(s){return String(s??"").split(/[_-]/).map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" ")}function Be(s){return s.replace(/[^a-zA-Z0-9_-]/g,"-")}const Ue=/^\d{4}-\d{2}-\d{2}$/;function J(s){if(Ue.test(s)){const[r,e,i]=s.split("-").map(Number),a=new Date(0);return a.setHours(0,0,0,0),a.setFullYear(r,e-1,i),a}return new Date(s)}function Ve(s,r=!1){if(!s)return r?"Pick a date and time":"Pick a date";const e=J(s);return Number.isNaN(e.getTime())?s:r?e.toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"}):C(e,"LLL dd, y")}function U(s){if(!s)return"";const r=J(s);if(Number.isNaN(r.getTime()))return"";const e=r.getTimezoneOffset()*6e4;return new Date(r.getTime()-e).toISOString().slice(0,16)}function ee(s){if(!s)return;const r=new Date(s);if(!Number.isNaN(r.getTime()))return r.toISOString()}function P(s,r){const e=r==="slug"?s.slug:s.metadata?.[r];return e==null?"":String(e)}function Me({control:s}){const r=[s.set_by,s.set_at?$e(s.set_at):null].filter(Boolean).join(" · ");return t.jsxs(Oe,{children:[t.jsx(Ie,{asChild:!0,children:t.jsxs(Te,{variant:"outline",className:"gap-1 border-emerald-500/30 bg-emerald-500/10 text-[10px] uppercase tracking-wide text-emerald-600 dark:text-emerald-400",children:[t.jsx(Le,{className:"h-3 w-3"}),"You"]})}),t.jsxs(Ae,{className:"max-w-xs space-y-1",children:[t.jsx("div",{className:"text-xs font-medium",children:"Human-owned field"}),s.note?t.jsx("div",{className:"text-xs text-primary-foreground/90",children:s.note}):null,r?t.jsx("div",{className:"text-[11px] text-primary-foreground/70",children:r}):null]})]})}function te({id:s,value:r,onChange:e,readonly:i,ariaLabel:a,includeTime:m=!1}){const u=r?J(r):void 0,[b,c]=O.useState(()=>U(r).slice(11));return O.useEffect(()=>{c(U(r).slice(11))},[r]),t.jsx("div",{className:"relative",children:t.jsxs(Ee,{children:[t.jsx(ke,{asChild:!0,children:t.jsxs(I,{id:s,"aria-label":a,type:"button",variant:"outline",disabled:i,className:T("w-full justify-start rounded-md bg-muted px-3 text-left font-normal",!r&&"text-muted-foreground"),children:[t.jsx(Re,{className:"mr-2 h-4 w-4 shrink-0"}),t.jsx("span",{className:"truncate",children:Ve(r,m)})]})}),t.jsxs(Pe,{className:"w-auto space-y-3 p-0",align:"start",children:[t.jsx(Fe,{mode:"single",selected:u,defaultMonth:u,onSelect:x=>{if(!x)return;if(!m){e(C(x,"yyyy-MM-dd"));return}const n=b||"00:00";e(ee(`${C(x,"yyyy-MM-dd")}T${n}`))},initialFocus:!0}),m?t.jsxs("div",{className:"border-t p-3 pt-0",children:[t.jsx(V,{htmlFor:`${s}-time`,className:"text-xs text-muted-foreground",children:"Time"}),t.jsx(q,{id:`${s}-time`,type:"time",value:b,onChange:x=>{c(x.target.value);const n=r?U(r).slice(0,10):u?C(u,"yyyy-MM-dd"):"";n&&e(ee(`${n}T${x.target.value}`))},disabled:i})]}):null]})]})})}function qe({id:s,value:r,onChange:e,readonly:i,ariaLabel:a,entityType:m,lookupField:u,numeric:b=!1,orgContext:c}){const x=f=>{if(f===void 0||f==="")return e(void 0);if(!b)return e(f);const w=Number(f);e(Number.isFinite(w)?w:f)},{data:n}=ge(m,c,{limit:Ne}),d=(n?.entities??[]).filter(f=>P(f,u)!==""),l=r==null?"":String(r),$=d.find(f=>P(f,u)===l);return c?i?t.jsx("div",{className:"flex h-9 items-center rounded-md border border-input bg-muted px-3 text-sm",children:$?.name||l||"-"}):t.jsx(ve,{contentClassName:"w-[320px]",searchPlaceholder:`Search ${E(m).toLowerCase()}...`,emptyText:`No ${m} found.`,trigger:f=>t.jsxs(I,{id:s,"aria-label":a,type:"button",variant:"outline",role:"combobox","aria-expanded":f,className:"w-full justify-between",children:[t.jsx("span",{className:T("truncate",!l&&"text-muted-foreground"),children:$?.name||l||`Select ${E(m).toLowerCase()}`}),t.jsx(Se,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]}),children:(f,w)=>{const S=w.trim(),j=S.length>0&&!d.some(v=>P(v,u)===S);return t.jsxs(t.Fragment,{children:[j?t.jsxs(W,{value:`use ${S}`,onSelect:()=>{x(S),f()},children:[t.jsx(pe,{className:"mr-2 h-3.5 w-3.5 opacity-60"}),t.jsxs("span",{className:"truncate",children:["Use ",t.jsx("span",{className:"font-medium",children:S})]})]}):null,d.map(v=>{const o=P(v,u),y=o===l;return t.jsxs(W,{value:`${v.name} ${v.slug} ${v.entity_type} ${o}`,onSelect:()=>{x(o||void 0),f()},children:[t.jsx(we,{className:T("mr-2 h-4 w-4",y?"opacity-100":"opacity-0")}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("div",{className:"truncate",children:v.name}),t.jsx("div",{className:"text-xs text-muted-foreground",children:v.slug})]})]},`${v.id}-${o}`)})]})}}):t.jsx(q,{id:s,"aria-label":a,type:b?"number":"text",value:l,onChange:f=>x(f.target.value||void 0),disabled:i})}function M({fieldPath:s,fieldKey:r,prop:e,value:i,onChange:a,isRequired:m,readonly:u,control:b,compact:c=!1,orgContext:x}){const n=e.description||E(r),d=Be(s),l=u||e.readOnly===!0,$=!c&&b?t.jsx(Me,{control:b}):null,f=e.type==="object"||!!e.properties,w=e.type==="array"&&!!e.items&&(e.items?.type==="object"||!!e.items?.properties),S=e.type==="array"&&!!e.items&&(e.items?.type==="string"||e.items?.type==="number"||e.items?.type==="integer"||e.items?.type==="boolean");if(e.type==="boolean")return t.jsxs("div",{className:c?"flex items-center":"flex items-center space-x-2 py-1",children:[t.jsx(le,{id:d,"aria-label":c?n:void 0,checked:i??!1,onCheckedChange:o=>a(o),disabled:l}),c?null:t.jsxs(V,{htmlFor:d,className:"flex items-center gap-1.5 font-normal",children:[n,$]})]});let j;if(e.enum&&Array.isArray(e.enum))j=t.jsxs(oe,{value:i==null?"":String(i),onValueChange:o=>a(o===""?void 0:e.type==="number"||e.type==="integer"?Number(o):o),disabled:l,children:[t.jsx(de,{id:d,"aria-label":c?n:void 0,children:t.jsx(ce,{placeholder:`Select ${n.toLowerCase()}`})}),t.jsx(me,{children:e.enum.map(o=>{const y=String(o);return t.jsx(ue,{value:y,children:E(y)},y)})})]});else if(e["x-link-entity-type"])j=t.jsx(qe,{id:d,value:i,onChange:a,readonly:l,ariaLabel:c?n:void 0,entityType:e["x-link-entity-type"],lookupField:e["x-link-lookup-field"]||"slug",numeric:e.type==="number"||e.type==="integer",orgContext:x});else if(e.type==="number"||e.type==="integer")j=t.jsx(fe,{id:d,ariaLabel:c?n:void 0,value:i,onChange:a,integer:e.type==="integer",placeholder:`Enter ${n.toLowerCase()}`,readOnly:l});else if(f){const o=Object.entries(e.properties??{}),y=new Set(e.required??[]),L=R(i)?i:{};j=o.length===0||!R(i)&&i!==void 0&&i!==null?t.jsx(G,{id:d,value:i,ariaLabel:`${n} JSON object`,readOnly:l,onChange:a}):t.jsx("fieldset",{"aria-label":c?n:void 0,"aria-labelledby":c?void 0:`${d}-label`,className:"space-y-3 rounded-md border p-3",children:o.map(([p,k])=>t.jsx(M,{fieldPath:`${s}.${p}`,fieldKey:p,prop:k,value:L[p],onChange:g=>{const h={...L};g===void 0?delete h[p]:h[p]=g,a(h)},isRequired:y.has(p),readonly:l,orgContext:x},p))})}else if(S)j=i!=null&&!xe(i)?t.jsx(_,{id:d,value:i,ariaLabel:`${n} JSON array`,readOnly:l,itemType:e.items?.type,itemEnum:e.items?.enum,minItems:e.minItems,maxItems:e.maxItems,onChange:a}):t.jsx(he,{id:d,value:i,itemType:e.items?.type,itemEnum:e.items?.enum,minItems:e.minItems,maxItems:e.maxItems,ariaLabel:c?n:void 0,readOnly:l,showHelp:!c,onChange:a});else if(w&&e.items){const o=Array.isArray(i)?i:[],y=Object.entries(e.items.properties??{}),L=new Set(e.items.required??[]),p=e.maxItems===void 0||o.length<e.maxItems,k=e.minItems===void 0||o.length>e.minItems;j=!Array.isArray(i)&&i!==void 0&&i!==null||y.length>0&&o.some(g=>!R(g))?t.jsx(_,{id:d,value:i,ariaLabel:`${n} JSON array`,readOnly:l,itemType:"object",minItems:e.minItems,maxItems:e.maxItems,onChange:a}):y.length===0?t.jsxs("fieldset",{"aria-label":c?n:void 0,"aria-labelledby":c?void 0:`${d}-label`,className:"space-y-3",children:[o.length===0?t.jsx("p",{className:"text-sm text-muted-foreground",children:"No rows"}):o.map((g,h)=>t.jsxs("fieldset",{className:"space-y-2 rounded-md border p-3",children:[t.jsxs("legend",{className:"px-1 text-xs font-medium text-muted-foreground",children:["Row ",h+1]}),t.jsx(G,{id:`${d}-${h}-json`,value:g,ariaLabel:`${n} row ${h+1} JSON object`,readOnly:l,onChange:A=>{const N=[...o];N[h]=A,a(N)}}),l?null:t.jsxs(I,{type:"button",variant:"ghost",size:"sm","aria-label":`Remove row ${h+1}`,disabled:!k,onClick:()=>a(o.filter((A,N)=>N!==h)),children:[t.jsx(Q,{className:"mr-1.5 h-4 w-4"}),"Remove row"]})]},`${s}.${h}`)),l?null:t.jsxs(I,{type:"button",variant:"outline",size:"sm",disabled:!p,onClick:()=>a([...o,{}]),children:[t.jsx(X,{className:"mr-1.5 h-4 w-4"}),"Add row"]})]}):t.jsxs("fieldset",{"aria-label":c?n:void 0,"aria-labelledby":c?void 0:`${d}-label`,className:"space-y-3",children:[t.jsx("div",{className:"rounded-md border",children:t.jsxs(be,{children:[t.jsx(je,{children:t.jsxs(z,{children:[y.map(([g,h])=>t.jsxs(Z,{children:[h.description||E(g),L.has(g)?t.jsx("span",{className:"text-destructive ml-1",children:"*"}):null]},g)),l?null:t.jsx(Z,{className:"w-12"})]})}),t.jsx(ye,{children:o.length===0?t.jsx(z,{children:t.jsx(B,{colSpan:y.length+(l?0:1),className:"text-sm text-muted-foreground",children:"No rows"})}):o.map((g,h)=>{const A=R(g)?g:{};return t.jsxs(z,{children:[y.map(([N,F])=>t.jsx(B,{className:"align-top",children:t.jsx(M,{fieldPath:`${s}.${h}.${N}`,fieldKey:N,prop:F,value:A[N],onChange:H=>{const Y=[...o],D={...A};H===void 0?delete D[N]:D[N]=H,Y[h]=D,a(Y)},isRequired:L.has(N),readonly:l,compact:!0,orgContext:x})},N)),l?null:t.jsx(B,{className:"align-top",children:t.jsx(I,{type:"button",variant:"ghost",size:"icon","aria-label":`Remove row ${h+1}`,disabled:!k,onClick:()=>a(o.filter((N,F)=>F!==h)),children:t.jsx(Q,{className:"h-4 w-4"})})})]},`${s}.${h}`)})})]})}),l?null:t.jsxs(I,{type:"button",variant:"outline",size:"sm",disabled:!p,onClick:()=>a([...o,{}]),children:[t.jsx(X,{className:"mr-1.5 h-4 w-4"}),"Add row"]})]})}else if(e.type==="array")j=t.jsx(_,{id:d,value:i,ariaLabel:`${n} JSON array`,readOnly:l,itemType:e.items?.type,itemEnum:e.items?.enum,minItems:e.minItems,maxItems:e.maxItems,onChange:a});else if(e.format==="date")j=t.jsx(te,{id:d,value:typeof i=="string"?i:void 0,onChange:a,readonly:l,ariaLabel:c?n:void 0});else if(e.format==="date-time")j=t.jsx(te,{id:d,value:typeof i=="string"?i:void 0,onChange:a,readonly:l,ariaLabel:c?n:void 0,includeTime:!0});else{const o=e.format==="uri"||e.format==="url";j=t.jsx(q,{id:d,"aria-label":c?n:void 0,type:o?"url":"text",value:i??"",onChange:y=>a(y.target.value||void 0),placeholder:o?"https://example.com":`Enter ${n.toLowerCase()}`,disabled:l})}if(c)return j;const v=f||w;return t.jsxs("div",{className:"space-y-1.5",children:[v?t.jsxs("p",{id:`${d}-label`,className:"flex items-center gap-1.5 text-sm font-medium",children:[t.jsxs("span",{children:[n,m?t.jsx("span",{className:"text-destructive ml-1",children:"*"}):null]}),$]}):t.jsxs(V,{htmlFor:d,className:"flex items-center gap-1.5",children:[t.jsxs("span",{children:[n,m?t.jsx("span",{className:"text-destructive ml-1",children:"*"}):null]}),$]}),j]})}function We(s){const r={};for(const[e,i]of Object.entries(s)){const a=ne(i);a==null||a===""||(r[e]=a)}return r}function Ke({schema:s,values:r,onValuesChange:e,readonly:i=!1,fieldControls:a,orgContext:m}){const u=s,b=u?.properties,c=new Set(u?.required??[]),x=(n,d)=>{e({...r,[n]:d})};return!b||Object.keys(b).length===0?t.jsx("p",{className:"text-sm text-muted-foreground py-2",children:"No additional fields required for this entity type."}):t.jsx("div",{className:"space-y-4",children:Object.entries(b).map(([n,d])=>"x-measure"in d||"x-dimension"in d?null:t.jsx(M,{fieldPath:n,fieldKey:n,prop:d,value:r[n],onChange:l=>x(n,l),isRequired:c.has(n),readonly:i,control:a?.[n],orgContext:m},n))})}const Je=O.forwardRef(({className:s,orientation:r="horizontal",decorative:e=!0,...i},a)=>t.jsx(ie,{ref:a,decorative:e,orientation:r,className:T("shrink-0 bg-border",r==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",s),...i}));Je.displayName=ie.displayName;function se(s,r){const e=s?.properties;if(e)return Object.entries(e).find(([,i])=>i[r])?.[0]}function He(s){const r=s.trim(),e=r.split(/[\s._@/-]+/).filter(Boolean),i=e.length>=2?`${e[0][0]}${e[1][0]}`:(e[0]??r).slice(0,2);let a=0;for(let m=0;m<r.length;m++)a=a*31+r.charCodeAt(m)>>>0;return{initials:i.toUpperCase()||"?",hue:a%360}}function Ye(s){const[r,e]=O.useState();return O.useEffect(()=>{if(!s){e(void 0);return}let i=!1;const a=s.trim().toLowerCase();return crypto.subtle.digest("SHA-256",new TextEncoder().encode(a)).then(m=>{i||e(Array.from(new Uint8Array(m)).map(u=>u.toString(16).padStart(2,"0")).join(""))}),()=>{i=!0}},[s]),r?`https://www.gravatar.com/avatar/${r}?d=identicon&s=80`:void 0}function et({metadata:s,metadataSchema:r,name:e,typeIcon:i,className:a="h-6 w-6",iconClassName:m="h-5 w-5",initialsFallback:u=!1}){const b=se(r,"x-image"),c=se(r,"x-email"),x=b&&s?.[b]||void 0,n=c&&s?.[c]||void 0,d=Ye(x?void 0:n),l=x||d,[$,f]=O.useState(!1);if(O.useEffect(()=>{f(!1)},[l]),l&&!$)return t.jsx("img",{src:l,alt:e,referrerPolicy:"no-referrer",onError:()=>f(!0),className:T("rounded-full object-cover border border-border",a)});if(u){const w=e.trim()||n||Ge(s,r)||e,{initials:S,hue:j}=He(w);return t.jsx("span",{role:"img","aria-label":e,className:T("inline-grid place-items-center rounded-full border border-border font-semibold text-white select-none",a),style:{background:`oklch(0.55 0.13 ${j})`,fontSize:"0.85em"},children:S})}return t.jsx(Ce,{icon:i,className:m})}function Ge(s,r){if(!s)return;const e=r?.properties,i=["email","handle","username","login","github","x_handle","slug"],a=Object.keys(e||s);for(const m of a)if(i.includes(m.toLowerCase())){const u=s[m];if(typeof u=="string"&&u.trim())return u}}function Qe(s,r){if(typeof s!="string"||!r||r.length===0)return s;const e=s.trim();if(r.includes(e))return e;try{const i=JSON.parse(e);if(typeof i=="string"&&r.includes(i))return i}catch{}return s}function tt(s,r){if(!s)return{};const e=r?.properties;return e?Object.fromEntries(Object.entries(s).map(([i,a])=>[i,Qe(a,e[i]?.enum)])):{...s}}export{Ke as D,et as E,Je as S,tt as a,We as c,Qe as n};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i4 as t,j as n}from"./index-B2AmRqYh.js";import{a as s}from"./agents-workbench-C2sr5h82.js";import"./agent-editor-form-BYC4uSNz.js";import"./model-selector-CapL1ARf.js";import"./proposal-review-shell-D4YNrrye.js";import"./runs-oHveuEUB.js";function c(){const{owner:o,agentId:r}=t.useParams(),e=t.useSearch();return n.jsx(s,{owner:o,agentId:r,tab:"settings",runId:e.run_id})}export{c as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as i,j as e,L as c,a1 as l,af as t,aP as a,B as m,al as d}from"./index-B2AmRqYh.js";import{F as o}from"./full-page-spinner-Dd8eEaxq.js";function h(){const{session:s,isReady:n}=i();if(!n)return e.jsx(o,{});if(!s||!s.user)return e.jsx("div",{className:"container mx-auto py-8 px-4",children:e.jsxs("div",{className:"max-w-md mx-auto text-center space-y-4",children:[e.jsx("h1",{className:"text-2xl font-semibold",children:"Not signed in"}),e.jsx("p",{className:"text-muted-foreground",children:"Please sign in to view your settings."}),e.jsx(c,{to:"/auth/login",search:l({intent:"sign-in"}),className:"inline-block px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-colors",children:"Sign In"})]})});const r=async()=>{await d(),window.location.href="/"};return e.jsx("div",{className:"container mx-auto py-8 px-4",children:e.jsxs("div",{className:"max-w-2xl mx-auto space-y-8",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-semibold",children:"Settings"}),e.jsx("p",{className:"text-muted-foreground",children:"Manage your account settings"})]}),e.jsxs("div",{className:t(a,"p-6 space-y-6"),children:[e.jsx("h2",{className:"text-lg font-medium",children:"Profile"}),e.jsxs("div",{className:"flex items-center gap-4",children:[s.user.image?e.jsx("img",{src:s.user.image,alt:s.user.name||"User",referrerPolicy:"no-referrer",className:"h-16 w-16 rounded-full object-cover"}):e.jsx("div",{className:"h-16 w-16 rounded-full bg-primary/10 flex items-center justify-center",children:e.jsx("span",{className:"text-xl font-medium text-primary",children:(s.user.name||s.user.email||"U")[0].toUpperCase()})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:s.user.name||"User"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s.user.email})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Name"}),e.jsx("p",{className:"mt-1",children:s.user.name||"Not set"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Email"}),e.jsx("p",{className:"mt-1",children:s.user.email})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"User ID"}),e.jsx("p",{className:"mt-1 text-xs font-mono text-muted-foreground",children:s.user.id})]})]})]}),e.jsxs("div",{className:t(a,"p-6 space-y-4"),children:[e.jsx("h2",{className:"text-lg font-medium",children:"Account"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Sign out of your account on this device."}),e.jsx(m,{variant:"destructive",onClick:r,children:"Sign Out"})]})]})})}export{h as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i3 as r,j as t,Y as s}from"./index-B2AmRqYh.js";import{A as e}from"./agent-skill-context-BAr2Dw3F.js";import"./core.esm-QA7BQgiK.js";import"./skill-editor-D_W3QlRz.js";function p(){const{agentId:o}=r.useParams();return t.jsx(e,{agentId:o,children:t.jsx(s,{})})}export{p as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r,af as i}from"./index-B2AmRqYh.js";function l({checked:n,onCheckedChange:s,disabled:o,className:e,...t}){return r.jsx("button",{type:"button",role:"switch","aria-checked":n,disabled:o,onClick:()=>s(!n),className:i("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",n?"bg-primary":"bg-input",e),...t,children:r.jsx("span",{className:i("pointer-events-none block h-4 w-4 rounded-full bg-background ring-0 transition-transform",n?"translate-x-4":"translate-x-0")})})}export{l as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{fi as a}from"./index-B2AmRqYh.js";const n=a({orgContext:t=>({slug:t.slug??null}),queryKey:t=>["views",t.slug],tool:"manage_views",body:()=>({action:"list"}),transform:t=>(Array.isArray(t.views)?t.views:[]).flatMap(e=>!e||typeof e.key!="string"||typeof e.name!="string"?[]:[{key:e.key,name:e.name,attach:Array.isArray(e.attach)?e.attach:[],content_hash:typeof e.content_hash=="string"?e.content_hash:null}]),enabled:(t,e)=>!!t.slug&&!!e.organizationId,staleTime:1e4});export{n as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as s,cV as ce,cR as ue,j as d,aB as N,eZ as le,e_ as de,e$ as fe,cS as k,aE as pe,f0 as z,f1 as me,af as P,aj as L,ac as I,f2 as be}from"./index-B2AmRqYh.js";import{D as ve,E as he}from"./app-bridge-BH3g2mKG.js";var S="Tabs",[ye]=pe(S,[z]),B=z(),[ge,V]=ye(S),J=s.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:a,defaultValue:o,orientation:i="horizontal",dir:u,activationMode:g="automatic",...h}=e,l=ce(u),[c,m]=ue({prop:r,onChange:a,defaultProp:o??"",caller:S});return d.jsx(ge,{scope:n,baseId:le(),value:c,onValueChange:m,orientation:i,dir:l,activationMode:g,children:d.jsx(N.div,{dir:l,"data-orientation":i,...h,ref:t})})});J.displayName=S;var W="TabsList",H=s.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...a}=e,o=V(W,n),i=B(n);return d.jsx(de,{asChild:!0,...i,orientation:o.orientation,dir:o.dir,loop:r,children:d.jsx(N.div,{role:"tablist","aria-orientation":o.orientation,...a,ref:t})})});H.displayName=W;var X="TabsTrigger",Z=s.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:a=!1,...o}=e,i=V(X,n),u=B(n),g=K(i.baseId,r),h=ee(i.baseId,r),l=r===i.value;return d.jsx(fe,{asChild:!0,...u,focusable:!a,active:l,children:d.jsx(N.button,{type:"button",role:"tab","aria-selected":l,"aria-controls":h,"data-state":l?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:g,...o,ref:t,onMouseDown:k(e.onMouseDown,c=>{!a&&c.button===0&&c.ctrlKey===!1?i.onValueChange(r):c.preventDefault()}),onKeyDown:k(e.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&i.onValueChange(r)}),onFocus:k(e.onFocus,()=>{const c=i.activationMode!=="manual";!l&&!a&&c&&i.onValueChange(r)})})})});Z.displayName=X;var Q="TabsContent",Y=s.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:a,children:o,...i}=e,u=V(Q,n),g=K(u.baseId,r),h=ee(u.baseId,r),l=r===u.value,c=s.useRef(l);return s.useEffect(()=>{const m=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(m)},[]),d.jsx(me,{present:a||l,children:({present:m})=>d.jsx(N.div,{"data-state":l?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":g,hidden:!m,id:h,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:c.current?"0s":void 0},children:m&&o})})});Y.displayName=Q;function K(e,t){return`${e}-trigger-${t}`}function ee(e,t){return`${e}-content-${t}`}var xe=J,te=H,ne=Z,re=Y;const Ne=xe,we=s.forwardRef(({className:e,...t},n)=>d.jsx(te,{ref:n,className:P("inline-flex h-9 items-center justify-start gap-1 border-b border-border bg-transparent p-0",e),...t}));we.displayName=te.displayName;const Te=s.forwardRef(({className:e,...t},n)=>d.jsx(ne,{ref:n,className:P("inline-flex items-center justify-center whitespace-nowrap px-3 pb-2 pt-1 text-sm font-medium text-muted-foreground transition-all","border-b-2 border-transparent","hover:text-foreground","data-[state=active]:border-foreground data-[state=active]:text-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50",e),...t}));Te.displayName=ne.displayName;const Re=s.forwardRef(({className:e,...t},n)=>d.jsx(re,{ref:n,className:P("mt-4 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",e),...t}));Re.displayName=re.displayName;const Ee=new Set(["query_sql","query_sdk"]),O=new Map;function Ce(e){const t=O.get(e);if(t)return t;const n=L(`${I}/api/${e}/tools`,{method:"GET",credentials:"include",timeoutMs:15e3}).then(async r=>{if(!r.ok)throw new Error(`tool list failed: ${r.status}`);const a=await r.json();return new Set((a.tools??[]).flatMap(o=>typeof o.name=="string"&&o.annotations?.readOnlyHint===!0?[o.name]:[]))});return O.set(e,n),n.catch(()=>O.delete(e)),n}async function $e(e,t,n,r){if(n!=="invoke_view_action")return!Ee.has(n)&&!(await Ce(e)).has(n)?{error:`Views can only call read tools and their declared actions; "${n}" is neither`}:{url:`${I}/api/${e}/${encodeURIComponent(n)}`,body:r??{}};const{view:a,action:o,value:i,interaction_id:u}=r??{};return a!==t?{error:`This frame hosts "${t}", not "${String(a)}"`}:typeof o!="string"||!o?{error:"action is required"}:{url:`${I}/api/${e}/views/${encodeURIComponent(t)}/actions/${encodeURIComponent(o)}`,body:{value:i??null,interaction_id:u}}}const Se=({orgSlug:e,viewKey:t,scope:n,params:r,onParamsChange:a,contentHash:o,title:i,minHeight:u=96,className:g})=>{const h=s.useRef(null),l=s.useRef(null),[c,m]=s.useState(null),[$,_]=s.useState(null),[oe,se]=s.useState(u),j=s.useRef(null),T=s.useRef(null),D=s.useRef(u);D.current=u;const x=s.useRef({scope:n,params:r,onParamsChange:a});x.current={scope:n,params:r,onParamsChange:a};const R=be(e,t);s.useEffect(()=>{let y=!1;return R!==T.current&&(m(null),T.current=null,j.current=null),_(null),o!=null&&o===j.current&&R===T.current?()=>{y=!0}:(L(`${I}/api/${e}/views/${encodeURIComponent(t)}/shell`,{credentials:"include"}).then(async f=>{if(!f.ok)throw new Error(`shell ${f.status}`);const M=await f.text();if(y)return;const b=f.headers.get("X-Lobu-View-Hash");b!==null&&b===j.current&&R===T.current||(j.current=b,T.current=R,_(null),m(M))}).catch(f=>{y||_(f instanceof Error?f.message:String(f))}),()=>{y=!0})},[R,e,t,o]);const ae=JSON.stringify(r),ie=JSON.stringify(n);return s.useEffect(()=>{l.current?.sendToolInput({arguments:{scope:x.current.scope,params:x.current.params}})},[ie,ae]),s.useEffect(()=>{if(!c||$)return;const y=h.current;if(!y?.contentWindow)return;const f=e,M=t;let b=!1;const F=()=>document.documentElement.classList.contains("dark")?"dark":"light",v=new ve(null,{name:"Lobu",version:"1.0.0"},{openLinks:{},serverTools:{},updateModelContext:{structuredContent:{}}},{hostContext:{theme:F(),displayMode:"inline",platform:"web"}});v.addEventListener("sizechange",({height:p})=>{typeof p=="number"&&se(Math.max(D.current,Math.ceil(p)))}),v.oncalltool=async({name:p,arguments:w})=>{if(b)return{content:[{type:"text",text:"view unmounted"}],isError:!0};let E;try{E=await $e(f,M,p,w)}catch(U){return{content:[{type:"text",text:String(U)}],isError:!0}}if(b)return{content:[{type:"text",text:"view unmounted"}],isError:!0};if("error"in E)return{content:[{type:"text",text:E.error}],isError:!0};const A=await L(E.url,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(E.body),timeoutMs:3e4}),C=await A.json().catch(()=>null);return A.ok?{content:[{type:"text",text:JSON.stringify(C)}],structuredContent:C??{}}:{content:[{type:"text",text:C&&typeof C.error=="string"&&C.error||`API error: ${A.status}`}],isError:!0}},v.onupdatemodelcontext=async({structuredContent:p})=>{if(b)return{};const w=p?.params;return w&&typeof w=="object"&&!Array.isArray(w)&&x.current.onParamsChange(w),{}},v.onopenlink=async({url:p})=>b?{}:(window.open(p,"_blank","noopener,noreferrer"),{}),v.addEventListener("initialized",()=>{v.sendToolInput({arguments:{scope:x.current.scope,params:x.current.params}})});const q=new he(y.contentWindow,y.contentWindow);v.connect(q).catch(p=>{console.error("[view-frame] failed to initialize",p)}),l.current=v;const G=new MutationObserver(()=>{v.setHostContext({theme:F(),displayMode:"inline",platform:"web"})});return G.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>{b=!0,G.disconnect(),l.current=null,q.close()}},[c,$,e,t]),$?d.jsxs("div",{"data-testid":"view-frame-error",className:"text-sm text-destructive",children:["View failed to load: ",$]}):d.jsx("div",{className:g,"data-testid":"view-frame","data-view":t,children:c?d.jsx("iframe",{ref:h,title:i??t,srcDoc:c,sandbox:"allow-scripts",style:{width:"100%",height:oe,border:"none",display:"block"}}):d.jsx("div",{className:"animate-pulse rounded-md bg-muted/40",style:{height:u}})})};export{Ne as T,Se as V,we as a,Te as b,Re as c};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Resolve the egress proxy URL the Sentry transport must use.
|
|
3
|
-
*
|
|
4
|
-
* Worker subprocesses reach the network ONLY through the gateway egress proxy
|
|
5
|
-
* (HTTP_PROXY=http://localhost:8118); prod additionally pins the kernel to
|
|
6
|
-
* IPAddressDeny=any + allow-loopback, so any direct (non-proxied) connection is
|
|
7
|
-
* dropped. @sentry/node-core's transport reads ONLY the lowercase
|
|
8
|
-
* http_proxy/https_proxy env vars (node_modules/@sentry/node-core/.../
|
|
9
|
-
* transports/http.js), which the spawn env does not set — so without passing
|
|
10
|
-
* the proxy explicitly via transportOptions.proxy the capture is silently
|
|
11
|
-
* kernel-blocked in prod. Returns undefined in the server/dev (no proxy) →
|
|
12
|
-
* direct egress, which is correct there.
|
|
13
|
-
*/
|
|
14
|
-
export declare function resolveSentryEgressProxy(env?: NodeJS.ProcessEnv): string | undefined;
|
|
15
|
-
/**
|
|
16
|
-
* Initialize Sentry with configuration from environment variables.
|
|
17
|
-
* Only initializes if SENTRY_DSN is set — no implicit error reporting.
|
|
18
|
-
* Uses dynamic import to avoid module resolution issues in dev mode.
|
|
19
|
-
*/
|
|
20
|
-
export declare function initSentry(): Promise<void>;
|
|
21
|
-
/**
|
|
22
|
-
* Get the initialized Sentry instance
|
|
23
|
-
* @returns Sentry instance or null if not initialized
|
|
24
|
-
*/
|
|
25
|
-
export declare function getSentry(): typeof import("@sentry/node") | null;
|
|
26
|
-
//# sourceMappingURL=sentry.d.ts.map
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.resolveSentryEgressProxy = resolveSentryEgressProxy;
|
|
37
|
-
exports.initSentry = initSentry;
|
|
38
|
-
exports.getSentry = getSentry;
|
|
39
|
-
const logger_1 = require("./logger");
|
|
40
|
-
const sentry_scrubber_1 = require("./utils/sentry-scrubber");
|
|
41
|
-
// Lazy logger initialization to avoid circular dependency
|
|
42
|
-
let _logger = null;
|
|
43
|
-
function getLogger() {
|
|
44
|
-
if (!_logger) {
|
|
45
|
-
_logger = (0, logger_1.createLogger)("sentry");
|
|
46
|
-
}
|
|
47
|
-
return _logger;
|
|
48
|
-
}
|
|
49
|
-
let sentryInstance = null;
|
|
50
|
-
/**
|
|
51
|
-
* Resolve the egress proxy URL the Sentry transport must use.
|
|
52
|
-
*
|
|
53
|
-
* Worker subprocesses reach the network ONLY through the gateway egress proxy
|
|
54
|
-
* (HTTP_PROXY=http://localhost:8118); prod additionally pins the kernel to
|
|
55
|
-
* IPAddressDeny=any + allow-loopback, so any direct (non-proxied) connection is
|
|
56
|
-
* dropped. @sentry/node-core's transport reads ONLY the lowercase
|
|
57
|
-
* http_proxy/https_proxy env vars (node_modules/@sentry/node-core/.../
|
|
58
|
-
* transports/http.js), which the spawn env does not set — so without passing
|
|
59
|
-
* the proxy explicitly via transportOptions.proxy the capture is silently
|
|
60
|
-
* kernel-blocked in prod. Returns undefined in the server/dev (no proxy) →
|
|
61
|
-
* direct egress, which is correct there.
|
|
62
|
-
*/
|
|
63
|
-
function resolveSentryEgressProxy(env = process.env) {
|
|
64
|
-
return env.HTTP_PROXY || env.HTTPS_PROXY || undefined;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Initialize Sentry with configuration from environment variables.
|
|
68
|
-
* Only initializes if SENTRY_DSN is set — no implicit error reporting.
|
|
69
|
-
* Uses dynamic import to avoid module resolution issues in dev mode.
|
|
70
|
-
*/
|
|
71
|
-
async function initSentry() {
|
|
72
|
-
const sentryDsn = process.env.SENTRY_DSN;
|
|
73
|
-
if (!sentryDsn) {
|
|
74
|
-
getLogger().debug("Sentry disabled (no SENTRY_DSN configured)");
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
// transportOptions.proxy has highest priority in @sentry/node-core's
|
|
78
|
-
// transport; pass the gateway proxy through explicitly so worker captures
|
|
79
|
-
// route through it (the ingest host is allowlisted in
|
|
80
|
-
// gateway/config/network-allowlist.ts). See resolveSentryEgressProxy.
|
|
81
|
-
const egressProxy = resolveSentryEgressProxy();
|
|
82
|
-
try {
|
|
83
|
-
const Sentry = await Promise.resolve().then(() => __importStar(require("@sentry/node")));
|
|
84
|
-
sentryInstance = Sentry;
|
|
85
|
-
Sentry.init({
|
|
86
|
-
dsn: sentryDsn,
|
|
87
|
-
transportOptions: egressProxy ? { proxy: egressProxy } : undefined,
|
|
88
|
-
// Tag worker events with the same environment/release the server uses
|
|
89
|
-
// (instrument.ts) so worker and server issues group and filter together.
|
|
90
|
-
// ENVIRONMENT / SENTRY_RELEASE come from the pod env; APP_GIT_SHA is
|
|
91
|
-
// the image-baked fallback when SENTRY_RELEASE is unset.
|
|
92
|
-
environment: process.env.ENVIRONMENT || "production",
|
|
93
|
-
release: process.env.SENTRY_RELEASE || process.env.APP_GIT_SHA || undefined,
|
|
94
|
-
// Do not ship IP/cookies/headers by default — user content and identifiers
|
|
95
|
-
// travel through this stack and Sentry has no scrubbing for our schema.
|
|
96
|
-
sendDefaultPii: false,
|
|
97
|
-
// Worker Sentry exists for ISSUES (provider/model failures), not tracing.
|
|
98
|
-
// Every agent run spawns a worker; at 1.0 the fleet would burn the org's
|
|
99
|
-
// span quota (5M/mo on the current plan was exhausted by the server alone
|
|
100
|
-
// at 0.1) and drown the server's traces. Errors are unaffected — error
|
|
101
|
-
// capture uses sampleRate (default 1.0), not tracesSampleRate.
|
|
102
|
-
tracesSampleRate: 0,
|
|
103
|
-
integrations: [
|
|
104
|
-
Sentry.consoleLoggingIntegration({ levels: ["log", "warn", "error"] }),
|
|
105
|
-
],
|
|
106
|
-
// Same scrubbing the gateway installs (packages/server/src/instrument.ts).
|
|
107
|
-
// These three cover error events, transactions, and the breadcrumbs Node's
|
|
108
|
-
// default consoleIntegration derives from console output -- the paths that
|
|
109
|
-
// carry provider URLs, OAuth callback URLs and connector arguments, and so
|
|
110
|
-
// the `?token=`/`?code=` values in them. Without these the credentials the
|
|
111
|
-
// gateway stopped leaking still left the fleet through the worker.
|
|
112
|
-
//
|
|
113
|
-
// Note this does NOT cover consoleLoggingIntegration above: that routes
|
|
114
|
-
// through _INTERNAL_captureLog, which is filtered by beforeSendLog and is
|
|
115
|
-
// inert entirely unless `enableLogs` is set, which it is not here.
|
|
116
|
-
beforeSend: sentry_scrubber_1.scrubSentryErrorEvent,
|
|
117
|
-
beforeSendTransaction: sentry_scrubber_1.scrubSentryTransactionEvent,
|
|
118
|
-
beforeBreadcrumb: sentry_scrubber_1.scrubSentryBreadcrumb,
|
|
119
|
-
});
|
|
120
|
-
getLogger().debug("Sentry monitoring initialized");
|
|
121
|
-
}
|
|
122
|
-
catch (error) {
|
|
123
|
-
getLogger().warn("Sentry initialization failed (continuing without monitoring):", error);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* Get the initialized Sentry instance
|
|
128
|
-
* @returns Sentry instance or null if not initialized
|
|
129
|
-
*/
|
|
130
|
-
function getSentry() {
|
|
131
|
-
return sentryInstance;
|
|
132
|
-
}
|
|
133
|
-
//# sourceMappingURL=sentry.js.map
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Per-agent tool policy: which tools an agent may use, and the bash
|
|
3
|
-
* prefix allow/deny lists derived from the same patterns.
|
|
4
|
-
*
|
|
5
|
-
* Shared by every lane that assembles an agent's tool list or runs its shell —
|
|
6
|
-
* the agent worker, the gateway producer that hands an isolate turn its tools,
|
|
7
|
-
* and the isolate guest that runs the turn's bash — so one agent gets one
|
|
8
|
-
* answer whichever lane runs the turn. Everything here is pure: the isolate
|
|
9
|
-
* guest imports this module by its own subpath (`@lobu/core/tool-policy`),
|
|
10
|
-
* so it must never grow a Node import or a root `@lobu/core` import.
|
|
11
|
-
*/
|
|
12
|
-
import type { ToolsConfig } from "./contracts/agent-settings";
|
|
13
|
-
export type BashCommandPolicy = {
|
|
14
|
-
allowAll: boolean;
|
|
15
|
-
allowPrefixes: string[];
|
|
16
|
-
denyPrefixes: string[];
|
|
17
|
-
};
|
|
18
|
-
export type ToolPolicy = {
|
|
19
|
-
toolsConfig?: ToolsConfig;
|
|
20
|
-
allowedPatterns: string[];
|
|
21
|
-
deniedPatterns: string[];
|
|
22
|
-
strictMode: boolean;
|
|
23
|
-
bashPolicy: BashCommandPolicy;
|
|
24
|
-
};
|
|
25
|
-
export declare const DEFAULT_PACKAGE_MANAGER_DENY_PREFIXES: string[];
|
|
26
|
-
export declare function normalizeToolList(value?: string | string[]): string[];
|
|
27
|
-
export declare function buildToolPolicy(params: {
|
|
28
|
-
toolsConfig?: ToolsConfig;
|
|
29
|
-
allowedTools?: string | string[];
|
|
30
|
-
disallowedTools?: string | string[];
|
|
31
|
-
}): ToolPolicy;
|
|
32
|
-
export declare function isToolAllowedByPolicy(toolName: string, policy: ToolPolicy): boolean;
|
|
33
|
-
/**
|
|
34
|
-
* Advisory detector for an honestly-typed package-manager install/acquire
|
|
35
|
-
* command, used to return a helpful "declare it in nixPackages instead" message
|
|
36
|
-
* instead of a bare "command not found". Callers: the agent worker's bash
|
|
37
|
-
* preflight (`runtime/tools.ts`) and the isolate guest's workspace `bash`.
|
|
38
|
-
*
|
|
39
|
-
* This is a conservative TEXT hint, NOT the security boundary. It does not try
|
|
40
|
-
* to out-parse the shell, so it misses a quoted, escaped, or path-qualified
|
|
41
|
-
* name (`"nix" run`, `n\ix run`, `/usr/bin/nix run`), a manager behind an exec
|
|
42
|
-
* wrapper (`env nix run`, `xargs npm install`), a name built at runtime, and
|
|
43
|
-
* the body of an interpreter reached by path or long option (`/bin/bash -c`,
|
|
44
|
-
* `bash --login -c`). It also over-denies a manager named as an argument in a
|
|
45
|
-
* position the argument-data words do not cover (`for f in npm install`,
|
|
46
|
-
* `sudo grep nix run x`).
|
|
47
|
-
*
|
|
48
|
-
* That direction is chosen, not tolerated: over-denial is a confusing error on
|
|
49
|
-
* a harmless command, under-detection is a missing guard rail. So every
|
|
50
|
-
* uncertain case falls back to the base detector and flags, and only a word
|
|
51
|
-
* whose operand provably cannot be a command narrows it.
|
|
52
|
-
*
|
|
53
|
-
* Those misses are not holes on either shell that runs today. On the agent
|
|
54
|
-
* worker's default local backend the manager is not a runnable command:
|
|
55
|
-
* `UNSANDBOXED_INTERPRETERS` in the worker's `embedded/just-bash-bootstrap.ts`
|
|
56
|
-
* keeps it out of the just-bash registry, and that lookup is on the RESOLVED
|
|
57
|
-
* binary name, which quoting and paths cannot change. The isolate guest's
|
|
58
|
-
* workspace has no package manager registered at all. Either way the
|
|
59
|
-
* spellings above end in "command not found"; declared `nixPackages` is the
|
|
60
|
-
* sanctioned way to get tooling.
|
|
61
|
-
*
|
|
62
|
-
* Remote runtime providers (opt-in, e.g. `vercel`) have no discovery filter,
|
|
63
|
-
* but the worker's preflight runs before dispatch, so these deny prefixes
|
|
64
|
-
* apply there too and are what keeps a manager from reaching the provider at
|
|
65
|
-
* all. Loosening that for the sandbox tier would be a deliberate, separate
|
|
66
|
-
* change.
|
|
67
|
-
*
|
|
68
|
-
* Making this matcher airtight means reimplementing bash's lexer; attempts to
|
|
69
|
-
* do so produced false positives on honest commands and no gain in
|
|
70
|
-
* enforcement. Prefer widening the discovery filter over widening this regex.
|
|
71
|
-
*/
|
|
72
|
-
export declare function isDirectPackageInstallCommand(command: string): boolean;
|
|
73
|
-
export declare function enforceBashCommandPolicy(command: string, policy: BashCommandPolicy): void;
|
|
74
|
-
//# sourceMappingURL=tool-policy.d.ts.map
|