@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
package/dist/connectors/x.ts
CHANGED
|
@@ -4,16 +4,15 @@
|
|
|
4
4
|
* Supports two auth modes:
|
|
5
5
|
* - OAuth 2.0 user context against the X API v2 (preferred when a token is
|
|
6
6
|
* available — the ToS-compliant path).
|
|
7
|
-
* -
|
|
8
|
-
* connector: we attach the CDP Network domain
|
|
9
|
-
* x.com tab via the extension's `chrome.*` action
|
|
10
|
-
* pagination, and parse the GraphQL responses the
|
|
11
|
-
*
|
|
7
|
+
* - A separate, verified browser connection through the paired Owletto Chrome
|
|
8
|
+
* extension. Mirrors the LinkedIn connector: we attach the CDP Network domain
|
|
9
|
+
* in the user's signed-in x.com tab via the extension's `chrome.*` action
|
|
10
|
+
* dispatcher, drive scroll pagination, and parse the GraphQL responses the
|
|
11
|
+
* page emits. No Playwright, cookie cache, or `--remote-debugging-port` plumbing.
|
|
12
12
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* with a clear "no paired Owletto extension" error.
|
|
13
|
+
* Browser access requires a verified browser-authenticated connection.
|
|
14
|
+
* An OAuth connection does not gain browser access from a device pin; API
|
|
15
|
+
* failures stay on the OAuth path when no browser grant is available.
|
|
17
16
|
*
|
|
18
17
|
* Feeds:
|
|
19
18
|
* - tweets: search by query or track a handle (API v2 or extension search)
|
|
@@ -21,29 +20,34 @@
|
|
|
21
20
|
* - liked_tweets: posts the user has liked (API v2 or signed-in extension backfill)
|
|
22
21
|
* - bookmarks: posts the user has bookmarked (API v2 or extension)
|
|
23
22
|
* - direct_messages: 1:1 and group DMs (OAuth API; extension fallback on /messages)
|
|
24
|
-
* -
|
|
25
|
-
*
|
|
23
|
+
* - following_timeline: live chronological Following timeline (OAuth API,
|
|
24
|
+
* source reads only; does not import tweet events)
|
|
25
|
+
* - home_feed: personalized x.com home timeline (extension only — the
|
|
26
|
+
* API does not expose the algorithmic "For you" timeline;
|
|
26
27
|
* read via content-script scrape because CDP network capture
|
|
27
28
|
* blocks the feed from rendering, same as LinkedIn home_feed)
|
|
28
29
|
*/
|
|
29
30
|
|
|
30
31
|
import {
|
|
32
|
+
requireBrowser,
|
|
31
33
|
type ActionContext,
|
|
32
34
|
type ActionResult,
|
|
33
35
|
type ChromeActionDispatcher,
|
|
34
|
-
type RuntimeConnectorDefinition,
|
|
35
|
-
type EventAttributionRule,
|
|
36
|
-
type EventAttributionTargetSpec,
|
|
37
|
-
type EntityTraitSpec,
|
|
38
36
|
ConnectorRuntime,
|
|
39
37
|
calculateEngagementScore,
|
|
40
38
|
createHttpClient,
|
|
39
|
+
type EntityTraitSpec,
|
|
40
|
+
type EventAttributionRule,
|
|
41
|
+
type EventAttributionTargetSpec,
|
|
41
42
|
type EventEnvelope,
|
|
42
43
|
extensionDomScrape,
|
|
43
44
|
extensionNetworkSync,
|
|
44
|
-
|
|
45
|
+
type FeedReadContext,
|
|
46
|
+
type FeedReadResult,
|
|
45
47
|
type HttpClient,
|
|
48
|
+
HttpStatusError,
|
|
46
49
|
paginateByCursor,
|
|
50
|
+
type RuntimeConnectorDefinition,
|
|
47
51
|
type SyncContext,
|
|
48
52
|
type SyncResult,
|
|
49
53
|
} from "@lobu/connector-sdk";
|
|
@@ -54,7 +58,8 @@ type XSyncPage = {
|
|
|
54
58
|
checkpoint: Record<string, unknown>;
|
|
55
59
|
metadata?: SyncResult["metadata"];
|
|
56
60
|
};
|
|
57
|
-
|
|
61
|
+
|
|
62
|
+
import { normalizeXHandle, X_IDENTITY } from "./x-identity.js";
|
|
58
63
|
|
|
59
64
|
/** OAuth scopes needed per feed for the API path (not used to pause browser-capable feeds). */
|
|
60
65
|
const X_OAUTH_FEED_SCOPES: Record<string, readonly string[]> = {
|
|
@@ -353,12 +358,23 @@ const X_DM_COUNTERPARTY_ATTRIBUTIONS: EventAttributionRule[] = [
|
|
|
353
358
|
entityType: "person",
|
|
354
359
|
titlePath: "metadata.sender_name",
|
|
355
360
|
identities: [
|
|
356
|
-
{
|
|
357
|
-
|
|
361
|
+
{
|
|
362
|
+
namespace: X_IDENTITY.USER_ID,
|
|
363
|
+
eventPath: "metadata.sender_id",
|
|
364
|
+
primary: true,
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
namespace: X_IDENTITY.HANDLE,
|
|
368
|
+
eventPath: "metadata.sender_handle",
|
|
369
|
+
matchOnly: true,
|
|
370
|
+
},
|
|
358
371
|
],
|
|
359
372
|
},
|
|
360
373
|
traits: {
|
|
361
|
-
x_handle: {
|
|
374
|
+
x_handle: {
|
|
375
|
+
eventPath: "metadata.sender_handle",
|
|
376
|
+
mergeStrategy: "prefer_non_empty",
|
|
377
|
+
},
|
|
362
378
|
// Same trait key as X_PERSON_AUTHOR_TRAITS / DM counterparty — keep
|
|
363
379
|
// person metadata vocabulary consistent across X attribution paths.
|
|
364
380
|
x_display_name: {
|
|
@@ -526,8 +542,7 @@ function buildApiTweet(
|
|
|
526
542
|
)?.id;
|
|
527
543
|
|
|
528
544
|
const authorId = tweet.author_id;
|
|
529
|
-
const username =
|
|
530
|
-
usernameById.get(authorId ?? "") ?? defaultUsername ?? "";
|
|
545
|
+
const username = usernameById.get(authorId ?? "") ?? defaultUsername ?? "";
|
|
531
546
|
|
|
532
547
|
return {
|
|
533
548
|
id: tweet.id,
|
|
@@ -1230,28 +1245,11 @@ export function finalizeLikedTweetsResult(
|
|
|
1230
1245
|
|
|
1231
1246
|
// ── Extension dispatcher ───────────────────────────────────────
|
|
1232
1247
|
//
|
|
1233
|
-
//
|
|
1234
|
-
//
|
|
1235
|
-
//
|
|
1236
|
-
//
|
|
1237
|
-
// extension. When no extension is online in the connection's org, the bridge
|
|
1248
|
+
// Granted as ctx.browser only for the declared browser authentication mode.
|
|
1249
|
+
// The dispatcher's dispatch() rides a host capability up to the gateway's
|
|
1250
|
+
// /api/workers/dispatch-chrome-action bridge and out to the connection's
|
|
1251
|
+
// selected Owletto extension. When that browser is offline, the bridge
|
|
1238
1252
|
// returns `failed` and the dispatcher throws — we surface that verbatim.
|
|
1239
|
-
//
|
|
1240
|
-
// Structurally typed rather than taking SyncContext, so `execute()` can pass an
|
|
1241
|
-
// ActionContext without either context type having to know about the other.
|
|
1242
|
-
function requireExtensionDispatcher(ctx: {
|
|
1243
|
-
sessionState?: Record<string, unknown> | null;
|
|
1244
|
-
}): ChromeActionDispatcher {
|
|
1245
|
-
const handle = ctx.sessionState?.chrome_dispatcher as
|
|
1246
|
-
| ChromeActionDispatcher
|
|
1247
|
-
| undefined;
|
|
1248
|
-
if (!handle || typeof handle.dispatch !== "function") {
|
|
1249
|
-
throw new Error(
|
|
1250
|
-
"X connector requires a paired Owletto Chrome extension. No chrome_dispatcher was injected into sessionState — re-run on a connector-worker that has the dispatcher bridge.",
|
|
1251
|
-
);
|
|
1252
|
-
}
|
|
1253
|
-
return handle;
|
|
1254
|
-
}
|
|
1255
1253
|
|
|
1256
1254
|
// ── Sync paths ─────────────────────────────────────────────────
|
|
1257
1255
|
|
|
@@ -1430,6 +1428,17 @@ class XLikesPageTracker {
|
|
|
1430
1428
|
|
|
1431
1429
|
type XSyncBackend = "oauth_api" | "extension";
|
|
1432
1430
|
|
|
1431
|
+
function requireXBrowser(
|
|
1432
|
+
ctx: Pick<SyncContext, "browser">,
|
|
1433
|
+
): ChromeActionDispatcher {
|
|
1434
|
+
if (!ctx.browser) {
|
|
1435
|
+
throw new Error(
|
|
1436
|
+
"Use a separate X connection authenticated through your paired Chrome browser for browser-only feeds and actions.",
|
|
1437
|
+
);
|
|
1438
|
+
}
|
|
1439
|
+
return requireBrowser(ctx);
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1433
1442
|
function parseGrantedScopes(scope: string | null | undefined): Set<string> {
|
|
1434
1443
|
if (!scope) return new Set();
|
|
1435
1444
|
return new Set(
|
|
@@ -1461,8 +1470,7 @@ function readSyncBackendPreference(
|
|
|
1461
1470
|
}
|
|
1462
1471
|
|
|
1463
1472
|
/**
|
|
1464
|
-
*
|
|
1465
|
-
* paired extension instead of failing against the API.
|
|
1473
|
+
* Use browser fallback only when this connection has an authorized browser grant.
|
|
1466
1474
|
*/
|
|
1467
1475
|
function resolveSyncBackend(
|
|
1468
1476
|
ctx: SyncContext,
|
|
@@ -1470,13 +1478,12 @@ function resolveSyncBackend(
|
|
|
1470
1478
|
requiredScopes: readonly string[] | undefined,
|
|
1471
1479
|
): XSyncBackend {
|
|
1472
1480
|
const preference = readSyncBackendPreference(config);
|
|
1473
|
-
if (preference === "extension") return "extension";
|
|
1474
|
-
if (preference === "oauth_api" && ctx.credentials?.accessToken) {
|
|
1475
|
-
return "oauth_api";
|
|
1476
|
-
}
|
|
1477
|
-
|
|
1478
1481
|
const accessToken = ctx.credentials?.accessToken;
|
|
1479
|
-
if (
|
|
1482
|
+
if (preference === "extension" || !accessToken) {
|
|
1483
|
+
requireXBrowser(ctx);
|
|
1484
|
+
return "extension";
|
|
1485
|
+
}
|
|
1486
|
+
if (preference === "oauth_api" || !ctx.browser) return "oauth_api";
|
|
1480
1487
|
|
|
1481
1488
|
const granted = parseGrantedScopes(ctx.credentials?.scope);
|
|
1482
1489
|
if (!hasGrantedScopes(granted, requiredScopes)) return "extension";
|
|
@@ -1517,13 +1524,14 @@ async function syncWithOAuthFallback<T extends XSyncPage>(
|
|
|
1517
1524
|
}
|
|
1518
1525
|
}
|
|
1519
1526
|
|
|
1520
|
-
/**
|
|
1527
|
+
/** Fall back only when the connection has a browser grant and OAuth is not forced. */
|
|
1521
1528
|
async function syncOAuthWithOptionalFallback<T extends XSyncPage>(
|
|
1529
|
+
ctx: SyncContext,
|
|
1522
1530
|
config: Record<string, unknown>,
|
|
1523
1531
|
oauthFn: () => Promise<T>,
|
|
1524
1532
|
extensionFn: () => Promise<T>,
|
|
1525
1533
|
): Promise<T> {
|
|
1526
|
-
if (isTruthyConfigFlag(config.use_oauth)) return oauthFn();
|
|
1534
|
+
if (!ctx.browser || isTruthyConfigFlag(config.use_oauth)) return oauthFn();
|
|
1527
1535
|
return syncWithOAuthFallback(oauthFn, extensionFn);
|
|
1528
1536
|
}
|
|
1529
1537
|
|
|
@@ -1535,8 +1543,9 @@ function extractViewerUserId(json: unknown): string | undefined {
|
|
|
1535
1543
|
(data?.data as Record<string, unknown> | undefined)?.user_result,
|
|
1536
1544
|
];
|
|
1537
1545
|
for (const node of candidates) {
|
|
1538
|
-
const result = (
|
|
1539
|
-
|
|
1546
|
+
const result = (
|
|
1547
|
+
node as { user_results?: { result?: { rest_id?: string } } }
|
|
1548
|
+
)?.user_results?.result;
|
|
1540
1549
|
if (result?.rest_id) return String(result.rest_id);
|
|
1541
1550
|
}
|
|
1542
1551
|
return undefined;
|
|
@@ -1562,9 +1571,7 @@ function buildBrowserDmMessage(
|
|
|
1562
1571
|
const createdAt = String(
|
|
1563
1572
|
messageData.time ?? messageData.created_at ?? messageData.timestamp ?? "",
|
|
1564
1573
|
);
|
|
1565
|
-
const senderId = String(
|
|
1566
|
-
messageData.sender_id ?? messageNode.sender_id ?? "",
|
|
1567
|
-
);
|
|
1574
|
+
const senderId = String(messageData.sender_id ?? messageNode.sender_id ?? "");
|
|
1568
1575
|
const conversationId = String(
|
|
1569
1576
|
messageNode.conversation_id ??
|
|
1570
1577
|
messageNode.conversationId ??
|
|
@@ -1641,17 +1648,13 @@ function extractDmMessagesFromNode(
|
|
|
1641
1648
|
|
|
1642
1649
|
const content = record.content;
|
|
1643
1650
|
if (content && typeof content === "object") {
|
|
1644
|
-
messages.push(
|
|
1645
|
-
...extractDmMessagesFromNode(content, authUserId, seen),
|
|
1646
|
-
);
|
|
1651
|
+
messages.push(...extractDmMessagesFromNode(content, authUserId, seen));
|
|
1647
1652
|
}
|
|
1648
1653
|
|
|
1649
1654
|
const entries = record.entries;
|
|
1650
1655
|
if (Array.isArray(entries)) {
|
|
1651
1656
|
for (const entry of entries) {
|
|
1652
|
-
messages.push(
|
|
1653
|
-
...extractDmMessagesFromNode(entry, authUserId, seen),
|
|
1654
|
-
);
|
|
1657
|
+
messages.push(...extractDmMessagesFromNode(entry, authUserId, seen));
|
|
1655
1658
|
}
|
|
1656
1659
|
}
|
|
1657
1660
|
|
|
@@ -1681,9 +1684,7 @@ function extractDmMessagesFromNode(
|
|
|
1681
1684
|
record.user_events,
|
|
1682
1685
|
];
|
|
1683
1686
|
for (const candidate of nestedCandidates) {
|
|
1684
|
-
messages.push(
|
|
1685
|
-
...extractDmMessagesFromNode(candidate, authUserId, seen),
|
|
1686
|
-
);
|
|
1687
|
+
messages.push(...extractDmMessagesFromNode(candidate, authUserId, seen));
|
|
1687
1688
|
}
|
|
1688
1689
|
|
|
1689
1690
|
return messages;
|
|
@@ -1729,6 +1730,99 @@ async function resolveAuthenticatedUser(
|
|
|
1729
1730
|
return { id, username };
|
|
1730
1731
|
}
|
|
1731
1732
|
|
|
1733
|
+
/** Read one source-owned page. No sync/commit path or browser fallback exists. */
|
|
1734
|
+
async function readFollowingTimeline(
|
|
1735
|
+
ctx: FeedReadContext,
|
|
1736
|
+
): Promise<FeedReadResult> {
|
|
1737
|
+
if (!ctx.credentials?.accessToken) {
|
|
1738
|
+
throw new Error("X Following source reads require OAuth credentials.");
|
|
1739
|
+
}
|
|
1740
|
+
if (ctx.query?.trim() || ctx.offset || ctx.match || ctx.window) {
|
|
1741
|
+
throw new Error(
|
|
1742
|
+
"X Following source reads support cursor pagination, not queries, offsets, matches, or window coverage.",
|
|
1743
|
+
);
|
|
1744
|
+
}
|
|
1745
|
+
if (
|
|
1746
|
+
ctx.sort &&
|
|
1747
|
+
!(ctx.sort.column === "occurred_at" && ctx.sort.order === "desc")
|
|
1748
|
+
) {
|
|
1749
|
+
throw new Error(
|
|
1750
|
+
"X Following source reads only support occurred_at descending.",
|
|
1751
|
+
);
|
|
1752
|
+
}
|
|
1753
|
+
const limit = ctx.limit ?? 50;
|
|
1754
|
+
if (!Number.isInteger(limit) || limit < 1 || limit > 100) {
|
|
1755
|
+
throw new Error(
|
|
1756
|
+
"X Following source read limit must be an integer from 1 to 100.",
|
|
1757
|
+
);
|
|
1758
|
+
}
|
|
1759
|
+
const http = createOAuthHttpClient(ctx.credentials.accessToken);
|
|
1760
|
+
const user = await resolveAuthenticatedUser(http);
|
|
1761
|
+
const expected = ctx.config.expected_account_handle;
|
|
1762
|
+
if (
|
|
1763
|
+
typeof expected === "string" &&
|
|
1764
|
+
normalizeXHandle(expected) !== normalizeXHandle(user.username)
|
|
1765
|
+
) {
|
|
1766
|
+
throw new Error(
|
|
1767
|
+
`Authenticated X account @${user.username} does not match expected account ${expected}.`,
|
|
1768
|
+
);
|
|
1769
|
+
}
|
|
1770
|
+
const url = new URL(
|
|
1771
|
+
`https://api.x.com/2/users/${encodeURIComponent(user.id)}/timelines/reverse_chronological`,
|
|
1772
|
+
);
|
|
1773
|
+
url.searchParams.set("max_results", String(limit));
|
|
1774
|
+
url.searchParams.set("tweet.fields", `${TWEET_FIELDS},entities`);
|
|
1775
|
+
url.searchParams.set("expansions", "author_id");
|
|
1776
|
+
url.searchParams.set("user.fields", "username,name,protected");
|
|
1777
|
+
if (ctx.cursor) url.searchParams.set("pagination_token", ctx.cursor);
|
|
1778
|
+
const page = await http.get<
|
|
1779
|
+
Omit<XApiListResponse, "data" | "includes"> & {
|
|
1780
|
+
data?: Array<XApiTweetRecord & { entities?: { urls?: XExpandedUrl[] } }>;
|
|
1781
|
+
includes?: { users?: Array<XApiUserRecord & { protected?: boolean }> };
|
|
1782
|
+
}
|
|
1783
|
+
>(url.toString());
|
|
1784
|
+
if (
|
|
1785
|
+
page.errors?.length ||
|
|
1786
|
+
(!Array.isArray(page.data) && page.meta?.result_count !== 0)
|
|
1787
|
+
) {
|
|
1788
|
+
throw new Error("X Following API returned an incomplete or invalid page.");
|
|
1789
|
+
}
|
|
1790
|
+
const authors = new Map(
|
|
1791
|
+
(page.includes?.users ?? []).map((author) => [author.id, author]),
|
|
1792
|
+
);
|
|
1793
|
+
const handles = new Map(
|
|
1794
|
+
[...authors].map(([id, author]) => [id, author.username ?? ""]),
|
|
1795
|
+
);
|
|
1796
|
+
const rows: Record<string, unknown>[] = [];
|
|
1797
|
+
for (const record of page.data ?? []) {
|
|
1798
|
+
const tweet = buildApiTweet(record, handles);
|
|
1799
|
+
if (!tweet || !Number.isFinite(tweet.publishedAt.getTime())) {
|
|
1800
|
+
throw new Error(
|
|
1801
|
+
"X Following API returned a post without valid identity, content, or timestamp.",
|
|
1802
|
+
);
|
|
1803
|
+
}
|
|
1804
|
+
const author = authors.get(record.author_id ?? "");
|
|
1805
|
+
// A missing author/protection flag cannot establish public visibility.
|
|
1806
|
+
if (ctx.config.public_only === true && author?.protected !== false)
|
|
1807
|
+
continue;
|
|
1808
|
+
tweet.authorDisplayName = author?.name;
|
|
1809
|
+
tweet.urls = record.entities?.urls;
|
|
1810
|
+
const event = tweetToEvent(tweet);
|
|
1811
|
+
rows.push({
|
|
1812
|
+
...event,
|
|
1813
|
+
metadata: {
|
|
1814
|
+
...event.metadata,
|
|
1815
|
+
author_protected: author?.protected ?? null,
|
|
1816
|
+
},
|
|
1817
|
+
});
|
|
1818
|
+
}
|
|
1819
|
+
return {
|
|
1820
|
+
rows,
|
|
1821
|
+
nextCursor: page.meta?.next_token,
|
|
1822
|
+
hasMore: Boolean(page.meta?.next_token),
|
|
1823
|
+
};
|
|
1824
|
+
}
|
|
1825
|
+
|
|
1732
1826
|
async function resolveAccountHandle(
|
|
1733
1827
|
config: Record<string, unknown>,
|
|
1734
1828
|
http?: HttpClient,
|
|
@@ -1887,7 +1981,7 @@ async function syncViaExtension(args: {
|
|
|
1887
1981
|
const { ctx, url, interceptPatterns, parseResponse, maxScrolls, checkpoint } =
|
|
1888
1982
|
args;
|
|
1889
1983
|
const result = await extensionNetworkSync<XTweet>({
|
|
1890
|
-
dispatcher:
|
|
1984
|
+
dispatcher: requireXBrowser(ctx),
|
|
1891
1985
|
config: {
|
|
1892
1986
|
interceptPatterns,
|
|
1893
1987
|
allowedOrigins: X_ALLOWED_ORIGINS,
|
|
@@ -2007,7 +2101,7 @@ async function syncLikedTweetsViaExtension(
|
|
|
2007
2101
|
): Promise<XSyncPage> {
|
|
2008
2102
|
const accountHandle = await resolveAccountHandle(config);
|
|
2009
2103
|
const likesUrl = `https://x.com/${encodeURIComponent(accountHandle)}/likes`;
|
|
2010
|
-
const dispatcher =
|
|
2104
|
+
const dispatcher = requireXBrowser(ctx);
|
|
2011
2105
|
const previouslyComplete = checkpoint.likes_backfill_status === "complete";
|
|
2012
2106
|
const pageBudget = previouslyComplete
|
|
2013
2107
|
? readLikesIncrementalPageBudget(config)
|
|
@@ -2061,15 +2155,15 @@ async function syncLikedTweetsViaExtension(
|
|
|
2061
2155
|
url: likesUrl,
|
|
2062
2156
|
parseResponse,
|
|
2063
2157
|
checkAuth: (currentUrl) => !isXAuthWall(currentUrl),
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2158
|
+
triggerNextPage: async (_tabId, browserDispatcher, sessionId) => {
|
|
2159
|
+
let requestUrl: string | undefined;
|
|
2160
|
+
try {
|
|
2161
|
+
requestUrl = pages.prepareReplay();
|
|
2162
|
+
} catch {
|
|
2163
|
+
parserErrors.push("X likes cursor rewrite failed");
|
|
2164
|
+
return;
|
|
2165
|
+
}
|
|
2166
|
+
if (!requestUrl) return;
|
|
2073
2167
|
let observation: { ok?: boolean; status?: number };
|
|
2074
2168
|
try {
|
|
2075
2169
|
observation = await browserDispatcher.dispatch<{
|
|
@@ -2236,11 +2330,16 @@ async function syncBookmarksViaOAuthApi(
|
|
|
2236
2330
|
maxPages,
|
|
2237
2331
|
);
|
|
2238
2332
|
|
|
2239
|
-
return finalizeSyncResult(
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2333
|
+
return finalizeSyncResult(
|
|
2334
|
+
tweets,
|
|
2335
|
+
checkpoint,
|
|
2336
|
+
{
|
|
2337
|
+
backend: "oauth_api",
|
|
2338
|
+
api_calls: pageCount,
|
|
2339
|
+
feed: "bookmarks",
|
|
2340
|
+
},
|
|
2341
|
+
{ originType: "bookmark" },
|
|
2342
|
+
);
|
|
2244
2343
|
}
|
|
2245
2344
|
|
|
2246
2345
|
async function syncBookmarksViaExtension(
|
|
@@ -2270,14 +2369,10 @@ function parseApiDmListResponse(
|
|
|
2270
2369
|
const usernameById = new Map(
|
|
2271
2370
|
users.map((user) => [user.id, user.username ?? ""]),
|
|
2272
2371
|
);
|
|
2273
|
-
const nameById = new Map(
|
|
2274
|
-
users.map((user) => [user.id, user.name ?? ""]),
|
|
2275
|
-
);
|
|
2372
|
+
const nameById = new Map(users.map((user) => [user.id, user.name ?? ""]));
|
|
2276
2373
|
|
|
2277
2374
|
return (json.data ?? [])
|
|
2278
|
-
.map((event) =>
|
|
2279
|
-
buildDmMessage(event, authUserId, usernameById, nameById),
|
|
2280
|
-
)
|
|
2375
|
+
.map((event) => buildDmMessage(event, authUserId, usernameById, nameById))
|
|
2281
2376
|
.filter((message): message is XDmMessage => message !== null);
|
|
2282
2377
|
}
|
|
2283
2378
|
|
|
@@ -2347,7 +2442,7 @@ async function syncDirectMessagesViaExtension(
|
|
|
2347
2442
|
: "";
|
|
2348
2443
|
|
|
2349
2444
|
const result = await extensionNetworkSync<XDmMessage>({
|
|
2350
|
-
dispatcher:
|
|
2445
|
+
dispatcher: requireXBrowser(ctx),
|
|
2351
2446
|
config: {
|
|
2352
2447
|
interceptPatterns: [
|
|
2353
2448
|
{ regex: "/i/api/graphql/\\w+/.*DM" },
|
|
@@ -2388,7 +2483,7 @@ async function syncHomeFeedViaDomScrape(
|
|
|
2388
2483
|
): Promise<XSyncPage> {
|
|
2389
2484
|
const maxScrolls = readScrollBudget(config, { defaultMax: 10, cap: 30 });
|
|
2390
2485
|
const { items: rows, loggedIn } = await extensionDomScrape<HomeFeedRow>({
|
|
2391
|
-
dispatcher:
|
|
2486
|
+
dispatcher: requireXBrowser(ctx),
|
|
2392
2487
|
url: "https://x.com/home",
|
|
2393
2488
|
config: {
|
|
2394
2489
|
...HOME_FEED_SCRAPE_CONFIG,
|
|
@@ -2420,7 +2515,7 @@ const backendPreferenceProperties = {
|
|
|
2420
2515
|
type: "boolean",
|
|
2421
2516
|
default: false,
|
|
2422
2517
|
description:
|
|
2423
|
-
"
|
|
2518
|
+
"Use the paired Chrome browser. Requires a separate X connection authenticated with the browser method.",
|
|
2424
2519
|
},
|
|
2425
2520
|
use_oauth: {
|
|
2426
2521
|
type: "boolean",
|
|
@@ -3092,9 +3187,28 @@ export default class XConnector extends ConnectorRuntime {
|
|
|
3092
3187
|
key: "x",
|
|
3093
3188
|
name: "X (Twitter)",
|
|
3094
3189
|
description:
|
|
3095
|
-
"Fetches tweets, browser-visible like history, bookmarks, and DMs through the X API v2 or the paired Owletto Chrome extension. Links social actors into the person graph.",
|
|
3096
|
-
version: "3.
|
|
3190
|
+
"Fetches tweets, browser-visible like history, bookmarks, and DMs through the X API v2 or the paired Owletto Chrome extension, and reads the chronological Following timeline live through the X API. Links social actors into the person graph.",
|
|
3191
|
+
version: "3.14.2",
|
|
3097
3192
|
faviconDomain: "x.com",
|
|
3193
|
+
browser: {
|
|
3194
|
+
origins: ["https://x.com", "https://twitter.com"],
|
|
3195
|
+
authMethods: ["browser"],
|
|
3196
|
+
accountProbe: {
|
|
3197
|
+
url: "https://x.com/home",
|
|
3198
|
+
// twid is the signed-in user id, not a bearer credential or mutable handle.
|
|
3199
|
+
expression: `(async () => {
|
|
3200
|
+
for (let i = 0; i < 40; i++) {
|
|
3201
|
+
const profile = document.querySelector('[data-testid=AppTabBar_Profile_Link]');
|
|
3202
|
+
const raw = document.cookie.split('; ').find(cookie => cookie.startsWith('twid='));
|
|
3203
|
+
const identity = raw ? decodeURIComponent(raw.slice(5)) : '';
|
|
3204
|
+
if (profile && /^u=[0-9]+$/.test(identity)) return { accountId: identity.slice(2) };
|
|
3205
|
+
if (/login|signup|account\\/access/.test(location.pathname)) return null;
|
|
3206
|
+
await new Promise(resolve => setTimeout(resolve, 250));
|
|
3207
|
+
}
|
|
3208
|
+
return null;
|
|
3209
|
+
})()`,
|
|
3210
|
+
},
|
|
3211
|
+
},
|
|
3098
3212
|
authSchema: {
|
|
3099
3213
|
methods: [
|
|
3100
3214
|
{
|
|
@@ -3108,18 +3222,13 @@ export default class XConnector extends ConnectorRuntime {
|
|
|
3108
3222
|
"bookmark.read",
|
|
3109
3223
|
"dm.read",
|
|
3110
3224
|
],
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
"tweet.read",
|
|
3114
|
-
"like.read",
|
|
3115
|
-
"bookmark.read",
|
|
3116
|
-
"dm.read",
|
|
3117
|
-
"offline.access",
|
|
3118
|
-
"users.email",
|
|
3119
|
-
],
|
|
3225
|
+
// X requires tweet.read for /2/users/me, even for identity-only login.
|
|
3226
|
+
loginScopes: ["users.read", "tweet.read", "users.email"],
|
|
3120
3227
|
authorizationUrl: "https://x.com/i/oauth2/authorize",
|
|
3121
3228
|
tokenUrl: "https://api.x.com/2/oauth2/token",
|
|
3122
|
-
userinfoUrl:
|
|
3229
|
+
// No userinfoUrl: declaring one routes sign-in through generic OIDC,
|
|
3230
|
+
// which cannot read X's nested profile. Connect gets it from the
|
|
3231
|
+
// server's built-in twitter provider config instead.
|
|
3123
3232
|
tokenEndpointAuthMethod: "client_secret_basic",
|
|
3124
3233
|
usePkce: true,
|
|
3125
3234
|
clientIdKey: "TWITTER_CLIENT_ID",
|
|
@@ -3129,16 +3238,49 @@ export default class XConnector extends ConnectorRuntime {
|
|
|
3129
3238
|
setupInstructions:
|
|
3130
3239
|
"Create an X OAuth 2.0 app, add {{redirect_uri}} as the callback URL, then paste the client ID and client secret below.",
|
|
3131
3240
|
loginProvisioning: {
|
|
3132
|
-
autoCreateConnection:
|
|
3241
|
+
autoCreateConnection: false,
|
|
3133
3242
|
},
|
|
3134
3243
|
},
|
|
3135
3244
|
{
|
|
3136
|
-
type: "
|
|
3137
|
-
|
|
3245
|
+
type: "browser",
|
|
3246
|
+
mode: "live",
|
|
3138
3247
|
},
|
|
3139
3248
|
],
|
|
3140
3249
|
},
|
|
3141
3250
|
feeds: {
|
|
3251
|
+
following_timeline: {
|
|
3252
|
+
key: "following_timeline",
|
|
3253
|
+
name: "Following Timeline (live)",
|
|
3254
|
+
description:
|
|
3255
|
+
"Read the authenticated account's chronological Following timeline through the X API without importing tweet events. Bounded by X's available recent history; does not provide window coverage or the algorithmic For You feed.",
|
|
3256
|
+
read: readFollowingTimeline,
|
|
3257
|
+
configSchema: {
|
|
3258
|
+
type: "object",
|
|
3259
|
+
additionalProperties: false,
|
|
3260
|
+
properties: {
|
|
3261
|
+
expected_account_handle: {
|
|
3262
|
+
type: "string",
|
|
3263
|
+
pattern: "^@?[A-Za-z0-9_]{1,15}$",
|
|
3264
|
+
description:
|
|
3265
|
+
"Optional account identity check. Reject reads when the authorized account has a different handle.",
|
|
3266
|
+
},
|
|
3267
|
+
public_only: {
|
|
3268
|
+
type: "boolean",
|
|
3269
|
+
default: false,
|
|
3270
|
+
description:
|
|
3271
|
+
"Return only posts whose expanded author is explicitly public. Protected or unknown authors are excluded; pagination is preserved.",
|
|
3272
|
+
},
|
|
3273
|
+
},
|
|
3274
|
+
},
|
|
3275
|
+
eventKinds: {
|
|
3276
|
+
tweet: {
|
|
3277
|
+
description: "A source-owned post from the Following timeline",
|
|
3278
|
+
},
|
|
3279
|
+
reply: {
|
|
3280
|
+
description: "A source-owned reply from the Following timeline",
|
|
3281
|
+
},
|
|
3282
|
+
},
|
|
3283
|
+
},
|
|
3142
3284
|
tweets: {
|
|
3143
3285
|
key: "tweets",
|
|
3144
3286
|
name: "Tweets",
|
|
@@ -3164,7 +3306,7 @@ export default class XConnector extends ConnectorRuntime {
|
|
|
3164
3306
|
name: "My Posts",
|
|
3165
3307
|
sync: (ctx) => this.syncFeed(ctx),
|
|
3166
3308
|
description:
|
|
3167
|
-
"Posts and replies authored by the connected account.
|
|
3309
|
+
"Posts and replies authored by the connected account. OAuth connections use the X API; browser-authenticated connections use the paired Chrome extension.",
|
|
3168
3310
|
configSchema: accountTimelineConfigSchema,
|
|
3169
3311
|
eventKinds: {
|
|
3170
3312
|
tweet: {
|
|
@@ -3184,7 +3326,7 @@ export default class XConnector extends ConnectorRuntime {
|
|
|
3184
3326
|
name: "Liked Posts",
|
|
3185
3327
|
sync: (ctx) => this.syncFeed(ctx),
|
|
3186
3328
|
description:
|
|
3187
|
-
"Posts the connected account has liked. OAuth
|
|
3329
|
+
"Posts the connected account has liked. OAuth connections use the X API; browser-authenticated connections use the paired Chrome extension for resumable cursor backfill and incremental collection.",
|
|
3188
3330
|
configSchema: likedTweetsConfigSchema,
|
|
3189
3331
|
eventKinds: {
|
|
3190
3332
|
liked_tweet: {
|
|
@@ -3199,7 +3341,7 @@ export default class XConnector extends ConnectorRuntime {
|
|
|
3199
3341
|
name: "Bookmarks",
|
|
3200
3342
|
sync: (ctx) => this.syncFeed(ctx),
|
|
3201
3343
|
description:
|
|
3202
|
-
"Posts bookmarked by the connected account.
|
|
3344
|
+
"Posts bookmarked by the connected account. OAuth connections use the X API; browser-authenticated connections use the paired Chrome extension.",
|
|
3203
3345
|
configSchema: bookmarksConfigSchema,
|
|
3204
3346
|
eventKinds: {
|
|
3205
3347
|
bookmark: {
|
|
@@ -3214,7 +3356,7 @@ export default class XConnector extends ConnectorRuntime {
|
|
|
3214
3356
|
name: "Direct Messages",
|
|
3215
3357
|
sync: (ctx) => this.syncFeed(ctx),
|
|
3216
3358
|
description:
|
|
3217
|
-
"Direct message events across all conversations.
|
|
3359
|
+
"Direct message events across all conversations. OAuth connections use the X API and require dm.read; browser-authenticated connections use the paired Chrome extension on /messages. Auto-creates person entities for 1:1 counterparts.",
|
|
3218
3360
|
configSchema: bookmarksConfigSchema,
|
|
3219
3361
|
eventKinds: {
|
|
3220
3362
|
dm_message: {
|
|
@@ -3229,7 +3371,7 @@ export default class XConnector extends ConnectorRuntime {
|
|
|
3229
3371
|
name: "Home Timeline",
|
|
3230
3372
|
sync: (ctx) => this.syncFeed(ctx),
|
|
3231
3373
|
description:
|
|
3232
|
-
"Your personalized x.com home timeline (For you + Following).
|
|
3374
|
+
"Your personalized x.com home timeline (For you + Following). Requires a separate X connection authenticated through your paired Chrome browser. Use following_timeline for source-only chronological reads through the official API.",
|
|
3233
3375
|
configSchema: homeFeedConfigSchema,
|
|
3234
3376
|
eventKinds: {
|
|
3235
3377
|
tweet: {
|
|
@@ -3246,7 +3388,7 @@ export default class XConnector extends ConnectorRuntime {
|
|
|
3246
3388
|
kind: "write",
|
|
3247
3389
|
name: "Prepare reply",
|
|
3248
3390
|
description:
|
|
3249
|
-
"Stage a reply draft after the user opens the exact X post (fill the reply composer). NEVER opens a tab or submits — the human must click Reply. No auto-post path exists.",
|
|
3391
|
+
"Requires an X connection authenticated through your paired Chrome browser. Stage a reply draft after the user opens the exact X post (fill the reply composer). NEVER opens a tab or submits — the human must click Reply. No auto-post path exists.",
|
|
3250
3392
|
annotations: {
|
|
3251
3393
|
destructiveHint: false,
|
|
3252
3394
|
idempotentHint: false,
|
|
@@ -3326,7 +3468,7 @@ export default class XConnector extends ConnectorRuntime {
|
|
|
3326
3468
|
if (!tweetRef) {
|
|
3327
3469
|
return { success: false, error: "tweet_url or tweet_id is required" };
|
|
3328
3470
|
}
|
|
3329
|
-
const output = await prepareXReply(
|
|
3471
|
+
const output = await prepareXReply(requireXBrowser(ctx), {
|
|
3330
3472
|
tweetUrl: tweetRef,
|
|
3331
3473
|
body,
|
|
3332
3474
|
banner: ctx.input.banner !== false,
|
|
@@ -3344,11 +3486,14 @@ export default class XConnector extends ConnectorRuntime {
|
|
|
3344
3486
|
}
|
|
3345
3487
|
|
|
3346
3488
|
private async syncFeed(ctx: SyncContext): Promise<SyncResult> {
|
|
3347
|
-
//
|
|
3348
|
-
//
|
|
3489
|
+
// Collect before committing so an authorized browser fallback cannot
|
|
3490
|
+
// duplicate events gathered by a partially failed OAuth attempt.
|
|
3349
3491
|
const page = await this.collectFeed(ctx);
|
|
3350
3492
|
await ctx.commit(page.events, page.checkpoint);
|
|
3351
|
-
return {
|
|
3493
|
+
return {
|
|
3494
|
+
status: "complete",
|
|
3495
|
+
...(page.metadata ? { metadata: page.metadata } : {}),
|
|
3496
|
+
};
|
|
3352
3497
|
}
|
|
3353
3498
|
|
|
3354
3499
|
private async collectFeed(ctx: SyncContext): Promise<XSyncPage> {
|
|
@@ -3357,17 +3502,16 @@ export default class XConnector extends ConnectorRuntime {
|
|
|
3357
3502
|
const feedKey = ctx.feedKey ?? "tweets";
|
|
3358
3503
|
const oauthScopes = X_OAUTH_FEED_SCOPES[feedKey];
|
|
3359
3504
|
|
|
3360
|
-
//
|
|
3361
|
-
//
|
|
3505
|
+
// This feed reads the home page through the browser, regardless of
|
|
3506
|
+
// whether an OAuth token is present.
|
|
3362
3507
|
if (feedKey === "home_feed") {
|
|
3363
3508
|
return syncHomeFeedViaDomScrape(ctx, config, checkpoint);
|
|
3364
3509
|
}
|
|
3365
3510
|
|
|
3366
3511
|
if (feedKey === "my_tweets") {
|
|
3367
|
-
if (
|
|
3368
|
-
resolveSyncBackend(ctx, config, oauthScopes) === "oauth_api"
|
|
3369
|
-
) {
|
|
3512
|
+
if (resolveSyncBackend(ctx, config, oauthScopes) === "oauth_api") {
|
|
3370
3513
|
return syncOAuthWithOptionalFallback(
|
|
3514
|
+
ctx,
|
|
3371
3515
|
config,
|
|
3372
3516
|
() => syncMyTweetsViaOAuthApi(ctx, config, checkpoint),
|
|
3373
3517
|
() => syncMyTweetsViaExtension(ctx, config, checkpoint),
|
|
@@ -3377,10 +3521,9 @@ export default class XConnector extends ConnectorRuntime {
|
|
|
3377
3521
|
}
|
|
3378
3522
|
|
|
3379
3523
|
if (feedKey === "liked_tweets") {
|
|
3380
|
-
if (
|
|
3381
|
-
resolveSyncBackend(ctx, config, oauthScopes) === "oauth_api"
|
|
3382
|
-
) {
|
|
3524
|
+
if (resolveSyncBackend(ctx, config, oauthScopes) === "oauth_api") {
|
|
3383
3525
|
return syncOAuthWithOptionalFallback(
|
|
3526
|
+
ctx,
|
|
3384
3527
|
config,
|
|
3385
3528
|
() => syncLikedTweetsViaOAuthApi(ctx, config, checkpoint),
|
|
3386
3529
|
() => syncLikedTweetsViaExtension(ctx, config, checkpoint),
|
|
@@ -3390,10 +3533,9 @@ export default class XConnector extends ConnectorRuntime {
|
|
|
3390
3533
|
}
|
|
3391
3534
|
|
|
3392
3535
|
if (feedKey === "bookmarks") {
|
|
3393
|
-
if (
|
|
3394
|
-
resolveSyncBackend(ctx, config, oauthScopes) === "oauth_api"
|
|
3395
|
-
) {
|
|
3536
|
+
if (resolveSyncBackend(ctx, config, oauthScopes) === "oauth_api") {
|
|
3396
3537
|
return syncOAuthWithOptionalFallback(
|
|
3538
|
+
ctx,
|
|
3397
3539
|
config,
|
|
3398
3540
|
() => syncBookmarksViaOAuthApi(ctx, config, checkpoint),
|
|
3399
3541
|
() => syncBookmarksViaExtension(ctx, config, checkpoint),
|
|
@@ -3403,10 +3545,9 @@ export default class XConnector extends ConnectorRuntime {
|
|
|
3403
3545
|
}
|
|
3404
3546
|
|
|
3405
3547
|
if (feedKey === "direct_messages") {
|
|
3406
|
-
if (
|
|
3407
|
-
resolveSyncBackend(ctx, config, oauthScopes) === "oauth_api"
|
|
3408
|
-
) {
|
|
3548
|
+
if (resolveSyncBackend(ctx, config, oauthScopes) === "oauth_api") {
|
|
3409
3549
|
return syncOAuthWithOptionalFallback(
|
|
3550
|
+
ctx,
|
|
3410
3551
|
config,
|
|
3411
3552
|
() => syncDirectMessagesViaOAuthApi(ctx, config, checkpoint),
|
|
3412
3553
|
() => syncDirectMessagesViaExtension(ctx, config, checkpoint),
|
|
@@ -3415,12 +3556,11 @@ export default class XConnector extends ConnectorRuntime {
|
|
|
3415
3556
|
return syncDirectMessagesViaExtension(ctx, config, checkpoint);
|
|
3416
3557
|
}
|
|
3417
3558
|
|
|
3418
|
-
//
|
|
3419
|
-
//
|
|
3420
|
-
if (
|
|
3421
|
-
resolveSyncBackend(ctx, config, oauthScopes) === "oauth_api"
|
|
3422
|
-
) {
|
|
3559
|
+
// OAuth connections stay on the API even when scopes are missing; browser
|
|
3560
|
+
// search requires this connection's browser grant.
|
|
3561
|
+
if (resolveSyncBackend(ctx, config, oauthScopes) === "oauth_api") {
|
|
3423
3562
|
return syncOAuthWithOptionalFallback(
|
|
3563
|
+
ctx,
|
|
3424
3564
|
config,
|
|
3425
3565
|
() => syncViaOAuthApi(ctx, config, checkpoint),
|
|
3426
3566
|
() => syncSearchViaExtension(ctx, config, checkpoint),
|