@lobu/runtime-server 21.2.1 → 23.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 +18435 -1259
- package/dist/catalogs/skills.json +1 -1
- package/dist/component.json +1 -1
- package/dist/connectors/README.md +21 -6
- 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 +52 -33
- package/dist/connectors/herdr.ts +406 -0
- package/dist/connectors/jira-helpers.ts +313 -0
- package/dist/connectors/jira.ts +35 -227
- package/dist/connectors/linear.ts +7 -4
- package/dist/connectors/linkedin-browser-script.ts +13 -0
- package/dist/connectors/linkedin-draft-page.js +104 -0
- package/dist/connectors/linkedin-drafts.ts +73 -0
- package/dist/connectors/linkedin-identity.ts +32 -0
- package/dist/connectors/linkedin-inbox-adapter.js +1185 -0
- package/dist/connectors/linkedin-inbox.ts +156 -0
- package/dist/connectors/linkedin-like.ts +114 -0
- package/dist/connectors/linkedin-takeout.ts +577 -0
- package/dist/connectors/linkedin.ts +3998 -0
- package/dist/connectors/postgres.ts +27 -2
- package/dist/connectors/takeout-utils.ts +240 -0
- package/dist/connectors/tiktok-inbox-page.js +230 -0
- package/dist/connectors/tiktok-web-page.js +217 -0
- package/dist/connectors/tiktok_web.ts +319 -0
- package/dist/connectors/whatsapp-web-adapter.js +285 -567
- package/dist/connectors/whatsapp-web-helpers.ts +74 -455
- package/dist/connectors/whatsapp-web-identity.ts +135 -0
- package/dist/connectors/whatsapp_web.ts +159 -618
- package/dist/connectors/x-dm-adapter.js +556 -0
- package/dist/connectors/x-identity.ts +31 -2
- package/dist/connectors/x.ts +539 -253
- 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/20261017120000_drop_feeds_kind_virtual.sql +26 -0
- package/dist/db/migrations/20261017130000_drop_retired_dead_code_columns.sql +46 -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 +144 -137
- package/dist/guest.bundle.js +416 -330
- package/dist/owletto/dist/assets/_-3J-IrxWk.js +2 -0
- package/dist/owletto/dist/assets/_-DYUE3ix4.js +3 -0
- package/dist/owletto/dist/assets/_-DtqBFgK5.js +1 -0
- package/dist/owletto/dist/assets/_agentId-Bn2IAjIy.js +2 -0
- package/dist/owletto/dist/assets/_agentId-Cam7Z0N7.js +2 -0
- package/dist/owletto/dist/assets/_automationId-CXEiKVZJ.js +2 -0
- package/dist/owletto/dist/assets/_connectorKey._connectionId-CS85l61t.js +2 -0
- package/dist/owletto/dist/assets/_connectorKey.index-clVDIyW0.js +2 -0
- package/dist/owletto/dist/assets/_conversationId-Ci2k-BuN.js +2 -0
- package/dist/owletto/dist/assets/_deploymentId-BuUzGtVL.js +2 -0
- package/dist/owletto/dist/assets/_eventId-B0662F8h.js +2 -0
- package/dist/owletto/dist/assets/_name-CwWePlOl.js +2 -0
- package/dist/owletto/dist/assets/_owner-dTWkrKsK.js +3 -0
- package/dist/owletto/dist/assets/_shape-BtS3y4M9.js +2 -0
- package/dist/owletto/dist/assets/_skillKey-Dc9m-nlR.js +2 -0
- package/dist/owletto/dist/assets/_slug-DQHutM41.js +2 -0
- package/dist/owletto/dist/assets/_threadId-DtqBFgK5.js +1 -0
- package/dist/owletto/dist/assets/_viewKey-B30ik8ma.js +2 -0
- package/dist/owletto/dist/assets/_viewKey-CUHypQnF.js +2 -0
- package/dist/owletto/dist/assets/accept-invitation-w17IFTtf.js +2 -0
- package/dist/owletto/dist/assets/activity-route-view-CMqYiiKM.js +2 -0
- package/dist/owletto/dist/assets/agent-card-controls-mnTN2AZt.js +2 -0
- package/dist/owletto/dist/assets/{agent-client-setup-list-BFtgRwe8.js → agent-client-setup-list-Bg3hBfUV.js} +4 -3
- package/dist/owletto/dist/assets/agent-connect-pages-B_vrqLVc.js +2 -0
- package/dist/owletto/dist/assets/agent-editor-form-hTs7eO_U.js +2 -0
- package/dist/owletto/dist/assets/agent-guardrails-route-BOrCXcAl.js +2 -0
- package/dist/owletto/dist/assets/agent-loading-shells-Dqcvky-k.js +2 -0
- package/dist/owletto/dist/assets/agent-permissions-matrix-BOo_4r_4.js +2 -0
- package/dist/owletto/dist/assets/{agent-skill-context-BAr2Dw3F.js → agent-skill-context-CCdvtlmH.js} +2 -1
- package/dist/owletto/dist/assets/agent-skills-route-BUxIswuq.js +2 -0
- package/dist/owletto/dist/assets/agent-subpage-shell-D92imvSt.js +2 -0
- package/dist/owletto/dist/assets/agent-thread-BJOijbT0.js +6 -0
- package/dist/owletto/dist/assets/agents-9XjpDj_S.js +2 -0
- package/dist/owletto/dist/assets/agents-workbench-Bt5QCYQ7.js +2 -0
- package/dist/owletto/dist/assets/app-bridge-BCm4muqj.js +128 -0
- package/dist/owletto/dist/assets/app._appId-CKv7_squ.js +2 -0
- package/dist/owletto/dist/assets/automation-detail-content-vUwVumXf.js +2 -0
- package/dist/owletto/dist/assets/automations-9XjpDj_S.js +2 -0
- package/dist/owletto/dist/assets/{callback-CaRe2TOT.js → callback-BRgcL8gz.js} +2 -1
- package/dist/owletto/dist/assets/{card-CMmh2mzo.js → card-Djgp00r_.js} +2 -1
- package/dist/owletto/dist/assets/claim-BYUZnyMp.js +2 -0
- package/dist/owletto/dist/assets/client-rows-EJSKR6z1.js +1 -0
- package/dist/owletto/dist/assets/clients-D3Zbjxin.js +2 -0
- package/dist/owletto/dist/assets/code-editor-DHeyRGZI.js +16 -0
- package/dist/owletto/dist/assets/connect-CfsFsy9P.js +2 -0
- package/dist/owletto/dist/assets/connect._clientId-DkiC8xos.js +2 -0
- package/dist/owletto/dist/assets/connected._clientId-CIXrGOsT.js +2 -0
- package/dist/owletto/dist/assets/connected._clientId.activity-Ckdz6I0y.js +2 -0
- package/dist/owletto/dist/assets/connected._clientId.index-CNxafNeo.js +2 -0
- package/dist/owletto/dist/assets/connection-C3XXFEqh.js +2 -0
- package/dist/owletto/dist/assets/connection-feed-detail-CIJJLDP8.js +2 -0
- package/dist/owletto/dist/assets/connection-label-BobuYiAG.js +1 -0
- package/dist/owletto/dist/assets/connections-browser-CKZjzRz6.js +2 -0
- package/dist/owletto/dist/assets/{connector-provenance-BjKiUhYE.js → connector-provenance-8-d8hl10.js} +2 -1
- package/dist/owletto/dist/assets/connector-scope-lists-CadPVsI3.js +2 -0
- package/dist/owletto/dist/assets/{connectors-Baejya0T.js → connectors-lvLJ30lo.js} +2 -1
- package/dist/owletto/dist/assets/consent-CdSvVCgx.js +2 -0
- package/dist/owletto/dist/assets/conversations-table-BdXoZAfc.js +2 -0
- package/dist/owletto/dist/assets/{core.esm-QA7BQgiK.js → core.esm-CYvgWCuv.js} +2 -1
- package/dist/owletto/dist/assets/create-0xW9eXxG.js +2 -0
- package/dist/owletto/dist/assets/create-B0qhrrX4.js +2 -0
- package/dist/owletto/dist/assets/create-CAfF-yI1.js +2 -0
- package/dist/owletto/dist/assets/create-automation-form-CtSSeYj3.js +3 -0
- package/dist/owletto/dist/assets/create._connectorKey-i6xxkWKV.js +2 -0
- package/dist/owletto/dist/assets/{cronstrue-2GHCtD7h.js → cronstrue-n4qGUraE.js} +2 -1
- package/dist/owletto/dist/assets/deployments-4Itm35Xc.js +2 -0
- package/dist/owletto/dist/assets/deployments-RvUdVkj3.js +2 -0
- package/dist/owletto/dist/assets/{deployments-body-Bm2upStd.js → deployments-body-BMp7UsMo.js} +2 -1
- package/dist/owletto/dist/assets/device-CPU6CjkJ.js +2 -0
- package/dist/owletto/dist/assets/device-pin-tombstone-CrjG7gPo.js +2 -0
- package/dist/owletto/dist/assets/device._deviceId-Cs3ZmXWo.js +2 -0
- package/dist/owletto/dist/assets/{entity-options-CrbS6K-i.js → entity-options-uXjgT7y9.js} +2 -1
- package/dist/owletto/dist/assets/entity-page-Dc0LGr5U.js +2 -0
- package/dist/owletto/dist/assets/entity-type-page-CwZxa0BR.js +2 -0
- package/dist/owletto/dist/assets/event-detail-ve2d6Gbb.js +2 -0
- package/dist/owletto/dist/assets/events-feed-BtvhZF1f.js +2 -0
- package/dist/owletto/dist/assets/filter-editors-Cj-v6NtH.js +2 -0
- package/dist/owletto/dist/assets/full-page-spinner-DqpH99np.js +2 -0
- package/dist/owletto/dist/assets/guardrails-HFo2Ut8B.js +2 -0
- package/dist/owletto/dist/assets/identity-BigVSBCl.js +2 -0
- package/dist/owletto/dist/assets/index-B9uPN6FC.js +2 -0
- package/dist/owletto/dist/assets/index-BLEcy9-T.css +1 -0
- package/dist/owletto/dist/assets/index-BQVliQW1.js +2 -0
- package/dist/owletto/dist/assets/index-BfedB4Rc.js +2 -0
- package/dist/owletto/dist/assets/index-CDz3-ieP.js +1 -0
- package/dist/owletto/dist/assets/index-CUw3aKBI.js +2 -0
- package/dist/owletto/dist/assets/index-CXhxUkv3.js +2 -0
- package/dist/owletto/dist/assets/index-Cr5hwh-C.js +7950 -0
- package/dist/owletto/dist/assets/index-CzkTV4ZQ.js +2 -0
- package/dist/owletto/dist/assets/index-DKSx8JN_.js +2 -0
- package/dist/owletto/dist/assets/index-DVk7Ug0d.js +2 -0
- package/dist/owletto/dist/assets/index-DmZuKGf8.js +2 -0
- package/dist/owletto/dist/assets/index-DtqBFgK5.js +1 -0
- package/dist/owletto/dist/assets/index-Hio-HRfo.js +2 -0
- package/dist/owletto/dist/assets/{index-Cf0GJoiG.js → index-ICgKp3YK.js} +2 -1
- package/dist/owletto/dist/assets/index-Vcq4gwWv.js +1 -0
- package/dist/owletto/dist/assets/index-cPcroOH0.js +2 -0
- package/dist/owletto/dist/assets/{index-DlepU3cY.js → index-n7sTbNv4.js} +2 -1
- package/dist/owletto/dist/assets/index-rrnUF981.js +1 -0
- package/dist/owletto/dist/assets/index-xiFpcWKv.js +2 -0
- package/dist/owletto/dist/assets/json-diff-DBoag_OS.js +4 -0
- package/dist/owletto/dist/assets/{list-skeleton-BtWn2eo2.js → list-skeleton-C_GuoxAH.js} +2 -1
- package/dist/owletto/dist/assets/login-Ci6ixHuL.js +2 -0
- package/dist/owletto/dist/assets/logout-CLGgeZB7.js +2 -0
- package/dist/owletto/dist/assets/member-scope-gate-B44INDPY.js +2 -0
- package/dist/owletto/dist/assets/memory-browse-page-DyQiRvzl.js +103 -0
- package/dist/owletto/dist/assets/model-selector-dAbDgJvx.js +2 -0
- package/dist/owletto/dist/assets/models-DpVP7ZwX.js +2 -0
- package/dist/owletto/dist/assets/new-BUb7AnEW.js +2 -0
- package/dist/owletto/dist/assets/new-BkdULx2r.js +2 -0
- package/dist/owletto/dist/assets/new-CHOr-EcI.js +2 -0
- package/dist/owletto/dist/assets/oauth-workspace-access-BxsjwgdH.js +2 -0
- package/dist/owletto/dist/assets/organization-gxGeDjIV.js +2 -0
- package/dist/owletto/dist/assets/peek-pane-content-CHoQHe2H.js +2 -0
- package/dist/owletto/dist/assets/{permissions-h_qSft1A.js → permissions-aPHaKLec.js} +2 -1
- package/dist/owletto/dist/assets/proposal-review-shell-UcZr87_Q.js +2 -0
- package/dist/owletto/dist/assets/public-shell-ready-DcnlADmj.js +2 -0
- package/dist/owletto/dist/assets/{recent-JiBNvZzD.js → recent-D-65Pgu-.js} +2 -1
- package/dist/owletto/dist/assets/record-activity-CBXH6v1d.js +2 -0
- package/dist/owletto/dist/assets/{renderer-DgPLyEbx.js → renderer-mEDnVW0O.js} +28 -27
- package/dist/owletto/dist/assets/reset-password-uX_V6bip.js +2 -0
- package/dist/owletto/dist/assets/runs-C0rCgGwX.js +2 -0
- package/dist/owletto/dist/assets/runs-panel-Du1JMjg5.js +2 -0
- package/dist/owletto/dist/assets/runs-table-syPJ6r6T.js +2 -0
- package/dist/owletto/dist/assets/settings-9NkNA1G1.js +2 -0
- package/dist/owletto/dist/assets/settings-E-10sLQX.js +2 -0
- package/dist/owletto/dist/assets/skill-editor-D_W3QlRz.js +1 -0
- package/dist/owletto/dist/assets/skills-D2Ri9b4f.js +2 -0
- package/dist/owletto/dist/assets/source-record-panels-CPyzlfD1.js +2 -0
- package/dist/owletto/dist/assets/status-dot-B-EWMgq6.js +2 -0
- package/dist/owletto/dist/assets/tabs-DqIIkCX-.js +2 -0
- package/dist/owletto/dist/assets/{use-mention-search-B4DfZFm5.js → use-mention-search-By8RZyKW.js} +3 -2
- package/dist/owletto/dist/assets/view-param-filters-CqLZQrnO.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 +137029 -133673
- package/npm-shrinkwrap.json +612 -645
- package/package.json +4 -3
- package/vendor/connector-sdk/dist/browser-handoff-banner.d.ts +39 -0
- package/vendor/connector-sdk/dist/browser-handoff-banner.js +175 -0
- 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/browser-source-read.d.ts +52 -0
- package/vendor/connector-sdk/dist/browser-source-read.js +107 -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 +169 -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 +8 -2
- package/vendor/connector-sdk/dist/index.js +3 -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 +13 -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.d.ts +1 -1
- package/vendor/core/dist/capabilities.js +2 -1
- package/vendor/core/dist/connector-query-errors.d.ts +32 -0
- package/vendor/core/dist/connector-query-errors.js +41 -1
- 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-conversations.js +2 -2
- 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-feeds.d.ts +14 -0
- package/vendor/core/dist/contracts/tools/manage-feeds.js +17 -0
- 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 +130 -159
- package/vendor/core/dist/contracts/worker/protocol.js +88 -76
- package/vendor/core/dist/device-pin-tombstones.d.ts +44 -0
- package/vendor/core/dist/device-pin-tombstones.js +57 -0
- package/vendor/core/dist/index.d.ts +5 -5
- package/vendor/core/dist/index.js +4 -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 +17 -26
- 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/diagnostic-scrubber.js +437 -0
- package/vendor/core/dist/worker/auth.d.ts +44 -6
- package/vendor/core/dist/worker/auth.js +44 -11
- package/vendor/core/dist/worker/wire.d.ts +0 -10
- package/vendor/core/package.json +20 -11
- 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/contracts/worker/device-chat.d.ts +0 -4
- package/vendor/core/dist/contracts/worker/device-chat.js +0 -26
- 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
- package/vendor/core/dist/utils/sentry-scrubber.js +0 -228
|
@@ -1,305 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Per-agent tool policy: which tools an agent may use, and the bash
|
|
4
|
-
* prefix allow/deny lists derived from the same patterns.
|
|
5
|
-
*
|
|
6
|
-
* Shared by every lane that assembles an agent's tool list or runs its shell —
|
|
7
|
-
* the agent worker, the gateway producer that hands an isolate turn its tools,
|
|
8
|
-
* and the isolate guest that runs the turn's bash — so one agent gets one
|
|
9
|
-
* answer whichever lane runs the turn. Everything here is pure: the isolate
|
|
10
|
-
* guest imports this module by its own subpath (`@lobu/core/tool-policy`),
|
|
11
|
-
* so it must never grow a Node import or a root `@lobu/core` import.
|
|
12
|
-
*/
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.DEFAULT_PACKAGE_MANAGER_DENY_PREFIXES = void 0;
|
|
15
|
-
exports.normalizeToolList = normalizeToolList;
|
|
16
|
-
exports.buildToolPolicy = buildToolPolicy;
|
|
17
|
-
exports.isToolAllowedByPolicy = isToolAllowedByPolicy;
|
|
18
|
-
exports.isDirectPackageInstallCommand = isDirectPackageInstallCommand;
|
|
19
|
-
exports.enforceBashCommandPolicy = enforceBashCommandPolicy;
|
|
20
|
-
const bash_command_parser_1 = require("./bash-command-parser");
|
|
21
|
-
exports.DEFAULT_PACKAGE_MANAGER_DENY_PREFIXES = [
|
|
22
|
-
"apt ",
|
|
23
|
-
"apt-get ",
|
|
24
|
-
"yum ",
|
|
25
|
-
"dnf ",
|
|
26
|
-
"apk ",
|
|
27
|
-
"pacman ",
|
|
28
|
-
"zypper ",
|
|
29
|
-
"brew ",
|
|
30
|
-
"nix-shell ",
|
|
31
|
-
"nix-env ",
|
|
32
|
-
// New-style nix CLI. `nix shell`/`run`/`develop` put arbitrary packages on
|
|
33
|
-
// PATH or fetch-and-execute them and `nix build`/`nix-store` realise arbitrary
|
|
34
|
-
// derivations — the same capability the old-style commands above already
|
|
35
|
-
// denied. A bare `nix ` prefix covers every subcommand (conservative, like
|
|
36
|
-
// `brew `); `nixfmt` and friends keep working because the prefix needs the
|
|
37
|
-
// trailing space. This matcher only recognizes the honestly-typed leading
|
|
38
|
-
// command; what actually contains a package manager differs per backend —
|
|
39
|
-
// see the header on isDirectPackageInstallCommand.
|
|
40
|
-
"nix ",
|
|
41
|
-
"nix-build ",
|
|
42
|
-
"nix-store ",
|
|
43
|
-
"nix-channel ",
|
|
44
|
-
"nix-instantiate ",
|
|
45
|
-
"nix-prefetch-url ",
|
|
46
|
-
"nix-collect-garbage ",
|
|
47
|
-
"nix-copy-closure ",
|
|
48
|
-
// Ad-hoc package runners: fetch-and-run a tool that is not installed.
|
|
49
|
-
// `npx`/`bunx` are absent — they prefer already-installed local binaries.
|
|
50
|
-
"uvx ",
|
|
51
|
-
"uv tool install ",
|
|
52
|
-
"uv tool run ",
|
|
53
|
-
"uv tool upgrade ",
|
|
54
|
-
"uv add ",
|
|
55
|
-
"pipx install ",
|
|
56
|
-
"pipx run ",
|
|
57
|
-
"pipx upgrade ",
|
|
58
|
-
"pipx upgrade-all ",
|
|
59
|
-
"pipx inject ",
|
|
60
|
-
"pipx reinstall ",
|
|
61
|
-
"pipx reinstall-all ",
|
|
62
|
-
"pipx runpip ",
|
|
63
|
-
"pnpm dlx ",
|
|
64
|
-
"yarn dlx ",
|
|
65
|
-
"sudo apt ",
|
|
66
|
-
"sudo apt-get ",
|
|
67
|
-
"sudo yum ",
|
|
68
|
-
"sudo dnf ",
|
|
69
|
-
"sudo apk ",
|
|
70
|
-
"sudo pacman ",
|
|
71
|
-
"sudo zypper ",
|
|
72
|
-
"sudo brew ",
|
|
73
|
-
"sudo nix-shell ",
|
|
74
|
-
"sudo nix-env ",
|
|
75
|
-
"sudo nix ",
|
|
76
|
-
"sudo nix-build ",
|
|
77
|
-
"sudo nix-store ",
|
|
78
|
-
"sudo nix-channel ",
|
|
79
|
-
"sudo nix-instantiate ",
|
|
80
|
-
"sudo nix-prefetch-url ",
|
|
81
|
-
"sudo nix-collect-garbage ",
|
|
82
|
-
"sudo nix-copy-closure ",
|
|
83
|
-
"pip install ",
|
|
84
|
-
"pip3 install ",
|
|
85
|
-
"uv pip install ",
|
|
86
|
-
"npm install ",
|
|
87
|
-
"npm i ",
|
|
88
|
-
"pnpm install ",
|
|
89
|
-
"pnpm add ",
|
|
90
|
-
"yarn install ",
|
|
91
|
-
"yarn add ",
|
|
92
|
-
"bun install ",
|
|
93
|
-
"bun add ",
|
|
94
|
-
"cargo install ",
|
|
95
|
-
"go install ",
|
|
96
|
-
"gem install ",
|
|
97
|
-
"poetry add ",
|
|
98
|
-
"composer require ",
|
|
99
|
-
];
|
|
100
|
-
function normalizeToolName(name) {
|
|
101
|
-
return name.trim().toLowerCase();
|
|
102
|
-
}
|
|
103
|
-
function normalizeToolList(value) {
|
|
104
|
-
if (!value) {
|
|
105
|
-
return [];
|
|
106
|
-
}
|
|
107
|
-
const rawList = Array.isArray(value) ? value : value.split(/[,\n]/);
|
|
108
|
-
return rawList
|
|
109
|
-
.map((entry) => typeof entry === "string" ? entry.trim() : String(entry).trim())
|
|
110
|
-
.filter((entry) => entry.length > 0);
|
|
111
|
-
}
|
|
112
|
-
function parseBashFilter(pattern) {
|
|
113
|
-
const match = pattern.match(/^Bash\(([^:]+):\*\)$/i);
|
|
114
|
-
const prefix = match?.[1]?.trim();
|
|
115
|
-
return prefix || null;
|
|
116
|
-
}
|
|
117
|
-
function matchesToolPattern(toolName, pattern) {
|
|
118
|
-
const normalizedTool = normalizeToolName(toolName);
|
|
119
|
-
const normalizedPattern = pattern.trim();
|
|
120
|
-
const normalizedPatternLower = normalizedPattern.toLowerCase();
|
|
121
|
-
if (normalizedPattern === "*") {
|
|
122
|
-
return true;
|
|
123
|
-
}
|
|
124
|
-
if (normalizedPatternLower.endsWith("*")) {
|
|
125
|
-
const prefix = normalizedPatternLower.slice(0, -1);
|
|
126
|
-
return normalizedTool.startsWith(prefix);
|
|
127
|
-
}
|
|
128
|
-
return normalizedTool === normalizedPatternLower;
|
|
129
|
-
}
|
|
130
|
-
function buildToolPolicy(params) {
|
|
131
|
-
const allowedPatterns = normalizeToolList(params.allowedTools);
|
|
132
|
-
const deniedPatterns = normalizeToolList(params.disallowedTools);
|
|
133
|
-
const toolsConfig = params.toolsConfig;
|
|
134
|
-
const strictMode = toolsConfig?.strictMode === true;
|
|
135
|
-
const mergedAllowed = [
|
|
136
|
-
...(toolsConfig?.allowedTools ?? []),
|
|
137
|
-
...allowedPatterns,
|
|
138
|
-
].map((p) => p.trim());
|
|
139
|
-
const mergedDenied = [
|
|
140
|
-
...(toolsConfig?.deniedTools ?? []),
|
|
141
|
-
...deniedPatterns,
|
|
142
|
-
].map((p) => p.trim());
|
|
143
|
-
const bashAllowPrefixes = mergedAllowed
|
|
144
|
-
.map((pattern) => parseBashFilter(pattern))
|
|
145
|
-
.filter((prefix) => Boolean(prefix));
|
|
146
|
-
const bashDenyPrefixes = mergedDenied
|
|
147
|
-
.map((pattern) => parseBashFilter(pattern))
|
|
148
|
-
.filter((prefix) => Boolean(prefix));
|
|
149
|
-
const bashAllowAll = mergedAllowed.some((pattern) => matchesToolPattern("bash", pattern));
|
|
150
|
-
return {
|
|
151
|
-
toolsConfig,
|
|
152
|
-
allowedPatterns: mergedAllowed,
|
|
153
|
-
deniedPatterns: mergedDenied,
|
|
154
|
-
strictMode,
|
|
155
|
-
bashPolicy: {
|
|
156
|
-
allowAll: bashAllowAll,
|
|
157
|
-
allowPrefixes: bashAllowPrefixes,
|
|
158
|
-
denyPrefixes: [
|
|
159
|
-
...exports.DEFAULT_PACKAGE_MANAGER_DENY_PREFIXES,
|
|
160
|
-
...bashDenyPrefixes,
|
|
161
|
-
],
|
|
162
|
-
},
|
|
163
|
-
};
|
|
164
|
-
}
|
|
165
|
-
function isToolAllowedByPolicy(toolName, policy) {
|
|
166
|
-
const normalizedName = normalizeToolName(toolName);
|
|
167
|
-
const { allowedPatterns, deniedPatterns, strictMode } = policy;
|
|
168
|
-
const explicitDenied = deniedPatterns.some((pattern) => !parseBashFilter(pattern) && matchesToolPattern(normalizedName, pattern));
|
|
169
|
-
if (explicitDenied) {
|
|
170
|
-
return false;
|
|
171
|
-
}
|
|
172
|
-
if (normalizedName === "bash") {
|
|
173
|
-
if (strictMode) {
|
|
174
|
-
const explicitlyAllowed = allowedPatterns.some((pattern) => matchesToolPattern(normalizedName, pattern));
|
|
175
|
-
const hasCommandAllowlist = policy.bashPolicy.allowPrefixes.length > 0;
|
|
176
|
-
return explicitlyAllowed || hasCommandAllowlist;
|
|
177
|
-
}
|
|
178
|
-
return true;
|
|
179
|
-
}
|
|
180
|
-
if (!strictMode) {
|
|
181
|
-
return true;
|
|
182
|
-
}
|
|
183
|
-
return allowedPatterns.some((pattern) => matchesToolPattern(normalizedName, pattern));
|
|
184
|
-
}
|
|
185
|
-
const DIRECT_PACKAGE_INSTALL_PATTERNS = [
|
|
186
|
-
/(^|[\s;|&()])(?:sudo\s+)?(?:apt|apt-get|yum|dnf|apk|pacman|zypper|brew)\s+(?:install|upgrade|add)\b/i,
|
|
187
|
-
/(^|[\s;|&()])(?:sudo\s+)?(?:nix-shell|nix-env)\b/i,
|
|
188
|
-
// New-style nix subcommands and the nix-* helpers, recognized after a shell
|
|
189
|
-
// operator or `sudo` (leading forms are already covered by the prefix list).
|
|
190
|
-
/(^|[\s;|&()])(?:sudo\s+)?nix\s+(?:profile|shell|run|develop|build|eval|flake|store|copy|bundle|repl|search|edit|print-dev-env|why-depends|derivation|realisation|registry|upgrade-nix)\b/i,
|
|
191
|
-
/(^|[\s;|&()])(?:sudo\s+)?nix-(?:build|store|channel|instantiate|prefetch-url|collect-garbage|copy-closure)\b/i,
|
|
192
|
-
/(^|[\s;|&()])(?:pip|pip3)\s+install\b/i,
|
|
193
|
-
/(^|[\s;|&()])uv\s+pip\s+install\b/i,
|
|
194
|
-
/(^|[\s;|&()])uv\s+(?:tool\s+(?:install|run|upgrade)|add)\b/i,
|
|
195
|
-
/(^|[\s;|&()])uvx\b/i,
|
|
196
|
-
/(^|[\s;|&()])pipx\s+(?:install|run|upgrade|upgrade-all|inject|reinstall|reinstall-all|runpip)\b/i,
|
|
197
|
-
/(^|[\s;|&()])npm\s+(?:install|i)\b/i,
|
|
198
|
-
/(^|[\s;|&()])pnpm\s+(?:install|add|dlx)\b/i,
|
|
199
|
-
/(^|[\s;|&()])yarn\s+(?:install|add|global\s+add|dlx)\b/i,
|
|
200
|
-
/(^|[\s;|&()])bun\s+(?:install|add)\b/i,
|
|
201
|
-
/(^|[\s;|&()])cargo\s+install\b/i,
|
|
202
|
-
/(^|[\s;|&()])go\s+install\b/i,
|
|
203
|
-
/(^|[\s;|&()])gem\s+install\b/i,
|
|
204
|
-
/(^|[\s;|&()])poetry\s+add\b/i,
|
|
205
|
-
/(^|[\s;|&()])composer\s+require\b/i,
|
|
206
|
-
];
|
|
207
|
-
/**
|
|
208
|
-
* Longest command this matcher will scan. Past it the command is treated as an
|
|
209
|
-
* install attempt rather than parsed: the scan is superlinear in the command
|
|
210
|
-
* length and the caller does not control the input.
|
|
211
|
-
*/
|
|
212
|
-
const MAX_SCANNED_COMMAND_LENGTH = 8192;
|
|
213
|
-
/**
|
|
214
|
-
* Advisory detector for an honestly-typed package-manager install/acquire
|
|
215
|
-
* command, used to return a helpful "declare it in nixPackages instead" message
|
|
216
|
-
* instead of a bare "command not found". Callers: the agent worker's bash
|
|
217
|
-
* preflight (`runtime/tools.ts`) and the isolate guest's workspace `bash`.
|
|
218
|
-
*
|
|
219
|
-
* This is a conservative TEXT hint, NOT the security boundary. It does not try
|
|
220
|
-
* to out-parse the shell, so it misses a quoted, escaped, or path-qualified
|
|
221
|
-
* name (`"nix" run`, `n\ix run`, `/usr/bin/nix run`), a manager behind an exec
|
|
222
|
-
* wrapper (`env nix run`, `xargs npm install`), a name built at runtime, and
|
|
223
|
-
* the body of an interpreter reached by path or long option (`/bin/bash -c`,
|
|
224
|
-
* `bash --login -c`). It also over-denies a manager named as an argument in a
|
|
225
|
-
* position the argument-data words do not cover (`for f in npm install`,
|
|
226
|
-
* `sudo grep nix run x`).
|
|
227
|
-
*
|
|
228
|
-
* That direction is chosen, not tolerated: over-denial is a confusing error on
|
|
229
|
-
* a harmless command, under-detection is a missing guard rail. So every
|
|
230
|
-
* uncertain case falls back to the base detector and flags, and only a word
|
|
231
|
-
* whose operand provably cannot be a command narrows it.
|
|
232
|
-
*
|
|
233
|
-
* Those misses are not holes on either shell that runs today. On the agent
|
|
234
|
-
* worker's default local backend the manager is not a runnable command:
|
|
235
|
-
* `UNSANDBOXED_INTERPRETERS` in the worker's `embedded/just-bash-bootstrap.ts`
|
|
236
|
-
* keeps it out of the just-bash registry, and that lookup is on the RESOLVED
|
|
237
|
-
* binary name, which quoting and paths cannot change. The isolate guest's
|
|
238
|
-
* workspace has no package manager registered at all. Either way the
|
|
239
|
-
* spellings above end in "command not found"; declared `nixPackages` is the
|
|
240
|
-
* sanctioned way to get tooling.
|
|
241
|
-
*
|
|
242
|
-
* Remote runtime providers (opt-in, e.g. `vercel`) have no discovery filter,
|
|
243
|
-
* but the worker's preflight runs before dispatch, so these deny prefixes
|
|
244
|
-
* apply there too and are what keeps a manager from reaching the provider at
|
|
245
|
-
* all. Loosening that for the sandbox tier would be a deliberate, separate
|
|
246
|
-
* change.
|
|
247
|
-
*
|
|
248
|
-
* Making this matcher airtight means reimplementing bash's lexer; attempts to
|
|
249
|
-
* do so produced false positives on honest commands and no gain in
|
|
250
|
-
* enforcement. Prefer widening the discovery filter over widening this regex.
|
|
251
|
-
*/
|
|
252
|
-
function isDirectPackageInstallCommand(command) {
|
|
253
|
-
const trimmed = command.trim().toLowerCase();
|
|
254
|
-
if (!trimmed) {
|
|
255
|
-
return false;
|
|
256
|
-
}
|
|
257
|
-
// The interpreter-body regex backtracks quadratically on adversarial option
|
|
258
|
-
// clusters (`sh -` repeated), and on the isolate lane the model writes this
|
|
259
|
-
// string, so an unbounded scan would block the guest's only thread for
|
|
260
|
-
// seconds. No honest install command is anywhere near this long, and the
|
|
261
|
-
// matcher's documented bias is to fail toward flagging.
|
|
262
|
-
if (trimmed.length > MAX_SCANNED_COMMAND_LENGTH) {
|
|
263
|
-
return true;
|
|
264
|
-
}
|
|
265
|
-
const matches = (text) => exports.DEFAULT_PACKAGE_MANAGER_DENY_PREFIXES.some((prefix) => text.startsWith(prefix.toLowerCase())) || DIRECT_PACKAGE_INSTALL_PATTERNS.some((pattern) => pattern.test(text));
|
|
266
|
-
// Scan the command with quoted DATA blanked out and each data word's operands
|
|
267
|
-
// dropped, so a manager merely NAMED cannot match. Both scrubs are advisory
|
|
268
|
-
// and fail toward flagging: whatever they cannot prove to be data is matched.
|
|
269
|
-
if ((0, bash_command_parser_1.matchesBeforeArgumentData)((0, bash_command_parser_1.blankQuotedSpans)(trimmed), matches)) {
|
|
270
|
-
return true;
|
|
271
|
-
}
|
|
272
|
-
// Then scan `sh -c '…'` bodies, where the quoted text IS a command.
|
|
273
|
-
bash_command_parser_1.INTERPRETER_DASH_C.lastIndex = 0;
|
|
274
|
-
for (const m of trimmed.matchAll(bash_command_parser_1.INTERPRETER_DASH_C)) {
|
|
275
|
-
const body = m[2]?.trim();
|
|
276
|
-
if (body && (0, bash_command_parser_1.matchesBeforeArgumentData)((0, bash_command_parser_1.blankQuotedSpans)(body), matches)) {
|
|
277
|
-
return true;
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
return false;
|
|
281
|
-
}
|
|
282
|
-
function enforceBashCommandPolicy(command, policy) {
|
|
283
|
-
if (!command.trim()) {
|
|
284
|
-
return;
|
|
285
|
-
}
|
|
286
|
-
const segments = (0, bash_command_parser_1.splitShellCommands)(command);
|
|
287
|
-
if (segments.length === 0) {
|
|
288
|
-
return;
|
|
289
|
-
}
|
|
290
|
-
const hasAllowlist = !policy.allowAll && policy.allowPrefixes.length > 0;
|
|
291
|
-
for (const segment of segments) {
|
|
292
|
-
const normalizedSegment = segment.toLowerCase();
|
|
293
|
-
const denied = policy.denyPrefixes.some((prefix) => normalizedSegment.startsWith(prefix.toLowerCase()));
|
|
294
|
-
if (denied) {
|
|
295
|
-
throw new Error("Bash command denied by policy");
|
|
296
|
-
}
|
|
297
|
-
if (hasAllowlist) {
|
|
298
|
-
const allowed = policy.allowPrefixes.some((prefix) => normalizedSegment.startsWith(prefix.toLowerCase()));
|
|
299
|
-
if (!allowed) {
|
|
300
|
-
throw new Error("Bash command not allowed by policy");
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
//# sourceMappingURL=tool-policy.js.map
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Structural stand-in for the SDK's event shape. Declared here rather than
|
|
3
|
-
* imported so one scrubber serves BOTH Sentry majors in this repo -- this
|
|
4
|
-
* package is on @sentry/node ^10 and @lobu/server on ^9 -- without coupling
|
|
5
|
-
* the shared module to either one's type graph. `sdkProcessingMetadata` is the
|
|
6
|
-
* only field the walk treats specially; everything else is structural.
|
|
7
|
-
*/
|
|
8
|
-
interface SentryEventLike {
|
|
9
|
-
sdkProcessingMetadata?: Record<string, unknown> | undefined;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Recursively remove credential material from values headed for Sentry.
|
|
13
|
-
* This is deliberately defensive: telemetry must never make an unusual
|
|
14
|
-
* application value or a circular error object throw another error.
|
|
15
|
-
*/
|
|
16
|
-
export declare function scrubSentryValue(value: unknown): unknown;
|
|
17
|
-
export declare function scrubSentryErrorEvent<T extends SentryEventLike>(event: T): T;
|
|
18
|
-
/**
|
|
19
|
-
* Sampled wherever tracing is on -- but sampled is not exempt: a span's
|
|
20
|
-
* attributes carry the request URL, which is the very `?token=` vector the
|
|
21
|
-
* error path scrubs. Without this they reach Sentry unscrubbed. Rates are the
|
|
22
|
-
* consumer's business, not this module's (the gateway traces, the worker sets
|
|
23
|
-
* tracesSampleRate 0, so there it is installed and inert).
|
|
24
|
-
*/
|
|
25
|
-
export declare function scrubSentryTransactionEvent<T extends SentryEventLike>(event: T): T;
|
|
26
|
-
/** Never drops a breadcrumb; it only rewrites credential material in place. */
|
|
27
|
-
export declare function scrubSentryBreadcrumb<T extends object>(breadcrumb: T): T;
|
|
28
|
-
export {};
|
|
29
|
-
//# sourceMappingURL=sentry-scrubber.d.ts.map
|
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.scrubSentryValue = scrubSentryValue;
|
|
4
|
-
exports.scrubSentryErrorEvent = scrubSentryErrorEvent;
|
|
5
|
-
exports.scrubSentryTransactionEvent = scrubSentryTransactionEvent;
|
|
6
|
-
exports.scrubSentryBreadcrumb = scrubSentryBreadcrumb;
|
|
7
|
-
const secret_redaction_1 = require("./secret-redaction");
|
|
8
|
-
/**
|
|
9
|
-
* Secret as a QUERY PARAMETER name, and only there. `code` is an OAuth
|
|
10
|
-
* authorization code in `?code=…` but a Node/Postgres error code
|
|
11
|
-
* (`ECONNREFUSED`, `23505`) as an object key; `state` and `key` are the same
|
|
12
|
-
* story. Context decides, so this stays separate from the shared key denylist
|
|
13
|
-
* rather than widening it — redacting these as object keys would blank the
|
|
14
|
-
* fields triage actually reads.
|
|
15
|
-
*/
|
|
16
|
-
const SECRET_QUERY_PARAMS = new Set(["state", "code", "key"]);
|
|
17
|
-
/**
|
|
18
|
-
* Credential key names the shared config denylist has no reason to carry:
|
|
19
|
-
* request signatures reach telemetry (webhook headers, presigned URLs) but
|
|
20
|
-
* never appear in connector config, and that denylist also feeds the CLI's
|
|
21
|
-
* deployment manifest hash — widening it there would change hashes.
|
|
22
|
-
*/
|
|
23
|
-
const SECRET_KEY_SEGMENTS = new Set(["signature", "sig"]);
|
|
24
|
-
/**
|
|
25
|
-
* Whole (squashed) key names the shared denylist does not classify. Carried
|
|
26
|
-
* over from the bespoke sanitizer this module replaced: `verifier` and `state`
|
|
27
|
-
* are far too broad as segments (`freshness_state`, `run_state`), so these two
|
|
28
|
-
* are matched only as complete names.
|
|
29
|
-
*/
|
|
30
|
-
const SECRET_KEY_EXACT = new Set(["codeverifier", "sessionstate"]);
|
|
31
|
-
/** Deep enough to outlive Sentry's own normalize(); short of unbounded work. */
|
|
32
|
-
const MAX_DEPTH = 8;
|
|
33
|
-
const MAX_ENTRIES = 1000;
|
|
34
|
-
/** Separator/case-squashed form, for keys core's camel-case split can't read. */
|
|
35
|
-
function squashKey(key) {
|
|
36
|
-
return key.replace(/[^a-z0-9]/gi, "").toLowerCase();
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Object and header keys. Core's normalizer splits on case boundaries, so an
|
|
40
|
-
* arbitrarily-cased header (`CoOkIe`) normalizes to `co_ok_ie` and misses;
|
|
41
|
-
* test the squashed form too.
|
|
42
|
-
*/
|
|
43
|
-
function isSecretObjectKey(key) {
|
|
44
|
-
if ((0, secret_redaction_1.isSecretKey)(key))
|
|
45
|
-
return true;
|
|
46
|
-
if ((0, secret_redaction_1.isSecretKey)(squashKey(key)))
|
|
47
|
-
return true;
|
|
48
|
-
if (SECRET_KEY_EXACT.has(squashKey(key)))
|
|
49
|
-
return true;
|
|
50
|
-
// Matched per separated segment, not against the squashed whole:
|
|
51
|
-
// `X-Hub-Signature-256` squashes to `xhubsignature256`, which no exact set
|
|
52
|
-
// can ever hold, so every real signature header would slip through.
|
|
53
|
-
return key
|
|
54
|
-
.replace(/[^a-z0-9]+/gi, "_")
|
|
55
|
-
.toLowerCase()
|
|
56
|
-
.split("_")
|
|
57
|
-
.some((segment) => SECRET_KEY_SEGMENTS.has(segment));
|
|
58
|
-
}
|
|
59
|
-
const URL_PATTERN = /https?:\/\/[^\s"'<>]+/gi;
|
|
60
|
-
/**
|
|
61
|
-
* A relative URL (`/api/v1/files/a?token=…`) and Sentry's own
|
|
62
|
-
* `request.query_string` (`token=…`, no scheme and no path) never match
|
|
63
|
-
* URL_PATTERN, so the signed-download token would survive a URL-only scrub.
|
|
64
|
-
* The separator absorbs trailing whitespace because cookie serialization is
|
|
65
|
-
* `a=b; c=d`: without it every pair after the first space goes unredacted.
|
|
66
|
-
*/
|
|
67
|
-
const QUERY_PAIR_PATTERN = /([?&;]\s*|^)([A-Za-z0-9_.\-%[\]]+)=([^&;\s"'<>]*)/g;
|
|
68
|
-
function decodeKey(raw) {
|
|
69
|
-
try {
|
|
70
|
-
return decodeURIComponent(raw);
|
|
71
|
-
}
|
|
72
|
-
catch {
|
|
73
|
-
return raw;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
function isSecretQueryParam(name) {
|
|
77
|
-
const key = decodeKey(name);
|
|
78
|
-
return isSecretObjectKey(key) || SECRET_QUERY_PARAMS.has(squashKey(key));
|
|
79
|
-
}
|
|
80
|
-
function scrubString(value) {
|
|
81
|
-
// `postgres://user:pa55@host/db` carries its credential in the userinfo, not
|
|
82
|
-
// in a query pair or a secret-named key, so neither pass below would see it.
|
|
83
|
-
const withoutUriCredentials = (0, secret_redaction_1.redactUriCredentials)(value);
|
|
84
|
-
const withoutUrlQueries = withoutUriCredentials.replace(URL_PATTERN, (candidate) => {
|
|
85
|
-
// Trailing sentence punctuation is not part of the URL, but it is part of
|
|
86
|
-
// the message: strip it to parse, then put it back.
|
|
87
|
-
const trailing = candidate.match(/[),.;]+$/)?.[0] ?? "";
|
|
88
|
-
const bare = trailing ? candidate.slice(0, -trailing.length) : candidate;
|
|
89
|
-
try {
|
|
90
|
-
const url = new URL(bare);
|
|
91
|
-
return `${url.origin}${url.pathname}${trailing}`;
|
|
92
|
-
}
|
|
93
|
-
catch {
|
|
94
|
-
return candidate;
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
return withoutUrlQueries.replace(QUERY_PAIR_PATTERN, (match, lead, name) => isSecretQueryParam(name) ? `${lead}${name}=[REDACTED]` : match);
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Recursively remove credential material from values headed for Sentry.
|
|
101
|
-
* This is deliberately defensive: telemetry must never make an unusual
|
|
102
|
-
* application value or a circular error object throw another error.
|
|
103
|
-
*/
|
|
104
|
-
function scrubSentryValue(value) {
|
|
105
|
-
const seen = new WeakSet();
|
|
106
|
-
function scrub(current, depth = 0) {
|
|
107
|
-
if (typeof current === "string")
|
|
108
|
-
return scrubString(current);
|
|
109
|
-
if (current === null || typeof current !== "object")
|
|
110
|
-
return current;
|
|
111
|
-
if (seen.has(current))
|
|
112
|
-
return "[CIRCULAR]";
|
|
113
|
-
// beforeBreadcrumb runs BEFORE Sentry's own normalize(), so without a cap
|
|
114
|
-
// a single console breadcrumb carrying a huge or deeply nested object is
|
|
115
|
-
// fully deep-cloned on the hot path only to be truncated moments later.
|
|
116
|
-
if (depth >= MAX_DEPTH)
|
|
117
|
-
return "[TRUNCATED]";
|
|
118
|
-
// Tracks the current PATH, not every node ever visited. Two siblings may
|
|
119
|
-
// legitimately hold the same reference, and reporting the second one as
|
|
120
|
-
// [CIRCULAR] would corrupt the event; only an ancestor is a real cycle.
|
|
121
|
-
seen.add(current);
|
|
122
|
-
try {
|
|
123
|
-
return walk(current, depth);
|
|
124
|
-
}
|
|
125
|
-
finally {
|
|
126
|
-
seen.delete(current);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
function walk(current, depth) {
|
|
130
|
-
// An Error carries name/message/stack on its prototype, so Object.keys
|
|
131
|
-
// returns nothing and a plain walk would flatten it to `{}` — discarding
|
|
132
|
-
// the only part of the event worth reading.
|
|
133
|
-
if (current instanceof Error) {
|
|
134
|
-
const serialized = {
|
|
135
|
-
name: current.name,
|
|
136
|
-
message: scrubString(current.message),
|
|
137
|
-
};
|
|
138
|
-
if (current.stack)
|
|
139
|
-
serialized.stack = scrubString(current.stack);
|
|
140
|
-
if (current.cause !== undefined)
|
|
141
|
-
serialized.cause = scrub(current.cause, depth + 1);
|
|
142
|
-
for (const key of Object.keys(current)) {
|
|
143
|
-
serialized[key] = isSecretObjectKey(key)
|
|
144
|
-
? "[REDACTED]"
|
|
145
|
-
: scrub(current[key], depth + 1);
|
|
146
|
-
}
|
|
147
|
-
return serialized;
|
|
148
|
-
}
|
|
149
|
-
// Built-ins whose state is not enumerable: walking them as plain objects
|
|
150
|
-
// yields `{}` (Date, Map, Set, RegExp) or one key per byte (Buffer). A
|
|
151
|
-
// readable summary costs less payload and tells triage strictly more.
|
|
152
|
-
if (current instanceof Date)
|
|
153
|
-
return current.toISOString();
|
|
154
|
-
if (current instanceof RegExp)
|
|
155
|
-
return String(current);
|
|
156
|
-
if (ArrayBuffer.isView(current)) {
|
|
157
|
-
return `[${current.constructor.name} ${current.byteLength} bytes]`;
|
|
158
|
-
}
|
|
159
|
-
if (current instanceof Map)
|
|
160
|
-
return `[Map ${current.size} entries]`;
|
|
161
|
-
if (current instanceof Set)
|
|
162
|
-
return `[Set ${current.size} items]`;
|
|
163
|
-
if (Array.isArray(current)) {
|
|
164
|
-
return current
|
|
165
|
-
.slice(0, MAX_ENTRIES)
|
|
166
|
-
.map((item) => scrub(item, depth + 1));
|
|
167
|
-
}
|
|
168
|
-
const result = {};
|
|
169
|
-
try {
|
|
170
|
-
for (const key of Object.keys(current).slice(0, MAX_ENTRIES)) {
|
|
171
|
-
if (isSecretObjectKey(key)) {
|
|
172
|
-
result[key] = "[REDACTED]";
|
|
173
|
-
continue;
|
|
174
|
-
}
|
|
175
|
-
try {
|
|
176
|
-
result[key] = scrub(current[key], depth + 1);
|
|
177
|
-
}
|
|
178
|
-
catch {
|
|
179
|
-
result[key] = "[UNREADABLE]";
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
catch {
|
|
184
|
-
return "[UNREADABLE]";
|
|
185
|
-
}
|
|
186
|
-
return result;
|
|
187
|
-
}
|
|
188
|
-
return scrub(value);
|
|
189
|
-
}
|
|
190
|
-
/**
|
|
191
|
-
* `sdkProcessingMetadata` holds the live Scope -> Client -> options graph, and
|
|
192
|
-
* @sentry/core deletes the field outright in createEventEnvelope. Deep-walking
|
|
193
|
-
* it is therefore pure per-event work on a structure that never ships, and it
|
|
194
|
-
* is the only part of a prepared event holding class instances. Detach it for
|
|
195
|
-
* the walk and put the original reference back.
|
|
196
|
-
*/
|
|
197
|
-
function scrubEvent(event) {
|
|
198
|
-
const { sdkProcessingMetadata } = event;
|
|
199
|
-
const scrubbed = scrubSentryValue({
|
|
200
|
-
...event,
|
|
201
|
-
sdkProcessingMetadata: undefined,
|
|
202
|
-
});
|
|
203
|
-
if (sdkProcessingMetadata !== undefined) {
|
|
204
|
-
scrubbed.sdkProcessingMetadata = sdkProcessingMetadata;
|
|
205
|
-
}
|
|
206
|
-
return scrubbed;
|
|
207
|
-
}
|
|
208
|
-
function scrubSentryErrorEvent(event) {
|
|
209
|
-
return scrubEvent(event);
|
|
210
|
-
}
|
|
211
|
-
/**
|
|
212
|
-
* Sampled wherever tracing is on -- but sampled is not exempt: a span's
|
|
213
|
-
* attributes carry the request URL, which is the very `?token=` vector the
|
|
214
|
-
* error path scrubs. Without this they reach Sentry unscrubbed. Rates are the
|
|
215
|
-
* consumer's business, not this module's (the gateway traces, the worker sets
|
|
216
|
-
* tracesSampleRate 0, so there it is installed and inert).
|
|
217
|
-
*/
|
|
218
|
-
// Generic rather than naming TransactionEvent: @sentry/node does not
|
|
219
|
-
// re-export that type. Inference recovers it exactly at the
|
|
220
|
-
// beforeSendTransaction call site, in either major.
|
|
221
|
-
function scrubSentryTransactionEvent(event) {
|
|
222
|
-
return scrubEvent(event);
|
|
223
|
-
}
|
|
224
|
-
/** Never drops a breadcrumb; it only rewrites credential material in place. */
|
|
225
|
-
function scrubSentryBreadcrumb(breadcrumb) {
|
|
226
|
-
return scrubSentryValue(breadcrumb);
|
|
227
|
-
}
|
|
228
|
-
//# sourceMappingURL=sentry-scrubber.js.map
|