@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
|
@@ -40,6 +40,19 @@ import {
|
|
|
40
40
|
type SyncContext,
|
|
41
41
|
type SyncResult,
|
|
42
42
|
} from '@lobu/connector-sdk';
|
|
43
|
+
import { compileGoogleActions, executeGoogleAction, oauthScopes } from './_google/actions';
|
|
44
|
+
import type { DiscoveryDocument } from './_google/discovery';
|
|
45
|
+
import driveDiscovery from './_google/discovery/drive_v3.json';
|
|
46
|
+
import { GOOGLE_API_POLICIES } from './_google/policies';
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Supported Drive API methods as actions, compiled from the pinned Discovery
|
|
50
|
+
* document. `download_file` and `get_file` stay hand-written: the first picks
|
|
51
|
+
* `files.export` or `alt=media` by MIME type, the second returns the feed's row
|
|
52
|
+
* shape — work the raw methods leave to the caller.
|
|
53
|
+
*/
|
|
54
|
+
const DRIVE_POLICY = GOOGLE_API_POLICIES.drive_v3;
|
|
55
|
+
const DRIVE = compileGoogleActions(driveDiscovery as unknown as DiscoveryDocument, DRIVE_POLICY);
|
|
43
56
|
|
|
44
57
|
// ---------------------------------------------------------------------------
|
|
45
58
|
// Drive API types
|
|
@@ -325,7 +338,7 @@ export default class GoogleDriveConnector extends ConnectorRuntime<
|
|
|
325
338
|
{
|
|
326
339
|
type: 'oauth',
|
|
327
340
|
provider: 'google',
|
|
328
|
-
|
|
341
|
+
...oauthScopes(DRIVE_POLICY),
|
|
329
342
|
loginScopes: ['openid', 'email', 'profile'],
|
|
330
343
|
clientIdKey: 'GOOGLE_CLIENT_ID',
|
|
331
344
|
clientSecretKey: 'GOOGLE_CLIENT_SECRET',
|
|
@@ -405,6 +418,7 @@ export default class GoogleDriveConnector extends ConnectorRuntime<
|
|
|
405
418
|
},
|
|
406
419
|
},
|
|
407
420
|
actions: {
|
|
421
|
+
...DRIVE.actions,
|
|
408
422
|
download_file: {
|
|
409
423
|
key: 'download_file',
|
|
410
424
|
kind: 'read',
|
|
@@ -831,7 +845,7 @@ export default class GoogleDriveConnector extends ConnectorRuntime<
|
|
|
831
845
|
case 'get_file':
|
|
832
846
|
return await this.getFile(http, ctx.input);
|
|
833
847
|
default:
|
|
834
|
-
return
|
|
848
|
+
return await executeGoogleAction(DRIVE, ctx, http);
|
|
835
849
|
}
|
|
836
850
|
} catch (error) {
|
|
837
851
|
return {
|
|
@@ -23,8 +23,21 @@ import {
|
|
|
23
23
|
type SyncContext,
|
|
24
24
|
type SyncResult,
|
|
25
25
|
} from '@lobu/connector-sdk';
|
|
26
|
+
import { compileGoogleActions, executeGoogleAction, oauthScopes } from './_google/actions';
|
|
27
|
+
import type { DiscoveryDocument } from './_google/discovery';
|
|
28
|
+
import gmailDiscovery from './_google/discovery/gmail_v1.json';
|
|
29
|
+
import { GOOGLE_API_POLICIES } from './_google/policies';
|
|
26
30
|
import TurndownService from 'turndown';
|
|
27
31
|
|
|
32
|
+
/**
|
|
33
|
+
* Supported Gmail API methods as actions, compiled from the pinned Discovery
|
|
34
|
+
* document. The hand-written actions below stay: they compose several calls
|
|
35
|
+
* or decode MIME (`get_thread` returns readable bodies, `send_email` builds the
|
|
36
|
+
* RFC 2822 message) — work the raw methods leave to the caller.
|
|
37
|
+
*/
|
|
38
|
+
const GMAIL_POLICY = GOOGLE_API_POLICIES.gmail_v1;
|
|
39
|
+
const GMAIL = compileGoogleActions(gmailDiscovery as unknown as DiscoveryDocument, GMAIL_POLICY);
|
|
40
|
+
|
|
28
41
|
function createEmailBodyConverter(): TurndownService {
|
|
29
42
|
const converter = new TurndownService({
|
|
30
43
|
headingStyle: 'atx',
|
|
@@ -167,15 +180,7 @@ export default class GmailConnector extends ConnectorRuntime<GmailCheckpoint, Gm
|
|
|
167
180
|
{
|
|
168
181
|
type: 'oauth',
|
|
169
182
|
provider: 'google',
|
|
170
|
-
|
|
171
|
-
'https://www.googleapis.com/auth/gmail.readonly',
|
|
172
|
-
// compose covers drafts.create AND messages.send, so it is the single
|
|
173
|
-
// write scope for create_draft/reply/send_email. It must be required
|
|
174
|
-
// (not optional) — optional scopes are only requested when the caller
|
|
175
|
-
// explicitly asks for them, so an unadorned connect() would omit it
|
|
176
|
-
// and every write op would 403 insufficient-scope.
|
|
177
|
-
'https://www.googleapis.com/auth/gmail.compose',
|
|
178
|
-
],
|
|
183
|
+
...oauthScopes(GMAIL_POLICY),
|
|
179
184
|
loginScopes: ['openid', 'email', 'profile'],
|
|
180
185
|
clientIdKey: 'GOOGLE_CLIENT_ID',
|
|
181
186
|
clientSecretKey: 'GOOGLE_CLIENT_SECRET',
|
|
@@ -323,6 +328,7 @@ export default class GmailConnector extends ConnectorRuntime<GmailCheckpoint, Gm
|
|
|
323
328
|
},
|
|
324
329
|
},
|
|
325
330
|
actions: {
|
|
331
|
+
...GMAIL.actions,
|
|
326
332
|
send_email: {
|
|
327
333
|
key: 'send_email',
|
|
328
334
|
name: 'Send Email',
|
|
@@ -535,16 +541,10 @@ export default class GmailConnector extends ConnectorRuntime<GmailCheckpoint, Gm
|
|
|
535
541
|
for (const threadStub of threads) {
|
|
536
542
|
inspected++;
|
|
537
543
|
try {
|
|
538
|
-
const
|
|
539
|
-
// A thread deleted between list and
|
|
540
|
-
//
|
|
541
|
-
|
|
542
|
-
if (response.status === 404) continue;
|
|
543
|
-
if (!response.ok) {
|
|
544
|
-
throw new Error(`Gmail threads.get error (${response.status}): ${await response.text()}`);
|
|
545
|
-
}
|
|
546
|
-
const thread = (await response.json()) as GmailThreadGetResponse;
|
|
547
|
-
if (!thread.messages?.length) throw new Error('Gmail returned a thread without messages');
|
|
544
|
+
const thread = await this.loadThread(http, threadStub.id);
|
|
545
|
+
// A thread deleted between list and index has nothing left to sync.
|
|
546
|
+
// A failure fetching any indexed message must retry the whole thread.
|
|
547
|
+
if (!thread) continue;
|
|
548
548
|
const messages = [...thread.messages].sort((a, b) => Number(a.internalDate) - Number(b.internalDate));
|
|
549
549
|
const firstMessage = messages[0];
|
|
550
550
|
const latestMessage = messages[messages.length - 1];
|
|
@@ -637,7 +637,7 @@ export default class GmailConnector extends ConnectorRuntime<GmailCheckpoint, Gm
|
|
|
637
637
|
case 'download_attachment':
|
|
638
638
|
return await this.downloadAttachment(http, ctx.input);
|
|
639
639
|
default:
|
|
640
|
-
return
|
|
640
|
+
return await executeGoogleAction(GMAIL, ctx, http);
|
|
641
641
|
}
|
|
642
642
|
} catch (error) {
|
|
643
643
|
return {
|
|
@@ -1009,19 +1009,9 @@ export default class GmailConnector extends ConnectorRuntime<GmailCheckpoint, Gm
|
|
|
1009
1009
|
return { success: false, error: 'thread_id is required.' };
|
|
1010
1010
|
}
|
|
1011
1011
|
|
|
1012
|
-
const
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
if (!response.ok) {
|
|
1016
|
-
const errText = await response.text();
|
|
1017
|
-
return { success: false, error: `Gmail thread error (${response.status}): ${errText}` };
|
|
1018
|
-
}
|
|
1019
|
-
|
|
1020
|
-
const thread = (await response.json()) as GmailThreadGetResponse;
|
|
1021
|
-
const subject =
|
|
1022
|
-
thread.messages.length > 0
|
|
1023
|
-
? this.getHeader(thread.messages[0], 'Subject') || '(no subject)'
|
|
1024
|
-
: '(no subject)';
|
|
1012
|
+
const thread = await this.loadThread(http, threadId);
|
|
1013
|
+
if (!thread) return { success: false, error: 'Gmail thread error (404): thread not found' };
|
|
1014
|
+
const subject = this.getHeader(thread.messages[0], 'Subject') || '(no subject)';
|
|
1025
1015
|
|
|
1026
1016
|
const messages = [];
|
|
1027
1017
|
for (const msg of thread.messages) {
|
|
@@ -1055,6 +1045,34 @@ export default class GmailConnector extends ConnectorRuntime<GmailCheckpoint, Gm
|
|
|
1055
1045
|
// Helpers
|
|
1056
1046
|
// -------------------------------------------------------------------------
|
|
1057
1047
|
|
|
1048
|
+
/** Keep each HTTP response bounded by one message, even for long threads. */
|
|
1049
|
+
private async loadThread(http: HttpClient, threadId: string): Promise<GmailThreadGetResponse | null> {
|
|
1050
|
+
const params = new URLSearchParams({ format: 'minimal', fields: 'id,historyId,messages(id)' });
|
|
1051
|
+
const response = await http.raw(`${this.BASE_URL}/threads/${encodeURIComponent(threadId)}?${params}`);
|
|
1052
|
+
if (response.status === 404) return null;
|
|
1053
|
+
if (!response.ok) throw new Error(`Gmail threads.get error (${response.status}): ${await response.text()}`);
|
|
1054
|
+
const index = await response.json() as { id: string; historyId: string; messages?: Array<{ id: string }> };
|
|
1055
|
+
if (index.id !== threadId || !index.messages?.length) throw new Error('Gmail returned a thread without valid identity or messages');
|
|
1056
|
+
const ids = index.messages.map(message => message.id);
|
|
1057
|
+
if (ids.some(id => typeof id !== 'string' || !id) || new Set(ids).size !== ids.length) {
|
|
1058
|
+
throw new Error('Gmail returned malformed message identities');
|
|
1059
|
+
}
|
|
1060
|
+
const messages: GmailMessage[] = [];
|
|
1061
|
+
// Bound provider concurrency without serializing dozens of independent reads.
|
|
1062
|
+
for (let start = 0; start < ids.length; start += 4) {
|
|
1063
|
+
messages.push(...await Promise.all(ids.slice(start, start + 4).map(async id => {
|
|
1064
|
+
const result = await http.raw(`${this.BASE_URL}/messages/${encodeURIComponent(id)}?format=full`);
|
|
1065
|
+
if (!result.ok) throw new Error(`Gmail messages.get error (${result.status}): ${await result.text()}`);
|
|
1066
|
+
const message = await result.json() as GmailMessage;
|
|
1067
|
+
if (message.id !== id || message.threadId !== threadId || !message.payload) {
|
|
1068
|
+
throw new Error('Gmail returned malformed message identity or payload');
|
|
1069
|
+
}
|
|
1070
|
+
return message;
|
|
1071
|
+
})));
|
|
1072
|
+
}
|
|
1073
|
+
return { id: index.id, historyId: index.historyId, messages };
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1058
1076
|
private feedScope(config: GmailConfig): string {
|
|
1059
1077
|
const labels = Array.isArray(config.labels)
|
|
1060
1078
|
? config.labels.filter((label) => typeof label === 'string' && label.trim()).map((label) => label.trim())
|
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ConnectorRuntime,
|
|
3
|
+
type ActionContext,
|
|
4
|
+
type ActionDefinition,
|
|
5
|
+
type ActionResult,
|
|
6
|
+
type RuntimeConnectorDefinition,
|
|
7
|
+
} from '@lobu/connector-sdk';
|
|
8
|
+
|
|
9
|
+
const target = {
|
|
10
|
+
type: 'string',
|
|
11
|
+
minLength: 1,
|
|
12
|
+
maxLength: 128,
|
|
13
|
+
pattern: '^[a-zA-Z0-9][a-zA-Z0-9:_-]*$',
|
|
14
|
+
description:
|
|
15
|
+
'Explicit agent name or pane id returned by Herdr. Never targets the focused pane implicitly.',
|
|
16
|
+
};
|
|
17
|
+
const pane = { ...target, description: 'Explicit pane id returned by Herdr.' };
|
|
18
|
+
const workspace = { ...target, description: 'Explicit workspace id returned by Herdr.' };
|
|
19
|
+
const timeout = { type: 'integer', minimum: 100, maximum: 120000, default: 30000 };
|
|
20
|
+
const until = {
|
|
21
|
+
type: 'array',
|
|
22
|
+
maxItems: 5,
|
|
23
|
+
items: { type: 'string', enum: ['idle', 'working', 'blocked', 'done', 'unknown'] },
|
|
24
|
+
};
|
|
25
|
+
const read = {
|
|
26
|
+
source: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
enum: ['visible', 'recent', 'recent-unwrapped', 'detection'],
|
|
29
|
+
default: 'visible',
|
|
30
|
+
},
|
|
31
|
+
lines: { type: 'integer', minimum: 1, maximum: 500, default: 80 },
|
|
32
|
+
};
|
|
33
|
+
function action(
|
|
34
|
+
key: string,
|
|
35
|
+
name: string,
|
|
36
|
+
description: string,
|
|
37
|
+
kind: 'read' | 'write',
|
|
38
|
+
properties: Record<string, unknown> = {},
|
|
39
|
+
required: string[] = [],
|
|
40
|
+
): ActionDefinition {
|
|
41
|
+
return {
|
|
42
|
+
key,
|
|
43
|
+
name,
|
|
44
|
+
description,
|
|
45
|
+
kind,
|
|
46
|
+
inputSchema: { type: 'object', properties, required, additionalProperties: false },
|
|
47
|
+
annotations: {
|
|
48
|
+
destructiveHint: kind === 'write',
|
|
49
|
+
openWorldHint: kind === 'write',
|
|
50
|
+
idempotentHint: kind === 'read',
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** Shell only transports argv; all Herdr protocol and command semantics stay here. */
|
|
56
|
+
function quote(value: unknown): string {
|
|
57
|
+
if (typeof value !== 'string' || value.includes('\0'))
|
|
58
|
+
throw new Error('Expected a string without NUL bytes');
|
|
59
|
+
return "'" + value.replaceAll("'", "'\\''") + "'";
|
|
60
|
+
}
|
|
61
|
+
function text(input: Record<string, unknown>, key: string): string {
|
|
62
|
+
const value = input[key];
|
|
63
|
+
if (typeof value !== 'string' || !value.length || value.includes('\0'))
|
|
64
|
+
throw new Error(`${key} is required`);
|
|
65
|
+
return value;
|
|
66
|
+
}
|
|
67
|
+
function id(input: Record<string, unknown>, key = 'target'): string {
|
|
68
|
+
const value = text(input, key);
|
|
69
|
+
if (!/^[a-zA-Z0-9][a-zA-Z0-9:_-]{0,127}$/.test(value))
|
|
70
|
+
throw new Error(`${key} must be an explicit Herdr identifier`);
|
|
71
|
+
return value;
|
|
72
|
+
}
|
|
73
|
+
function integer(value: unknown, fallback: number, maximum: number, minimum = 1): number {
|
|
74
|
+
if (value === undefined) return fallback;
|
|
75
|
+
if (typeof value !== 'number' || !Number.isInteger(value) || value < minimum || value > maximum)
|
|
76
|
+
throw new Error('Invalid numeric limit');
|
|
77
|
+
return value;
|
|
78
|
+
}
|
|
79
|
+
function waitOptions(input: Record<string, unknown>): string[] {
|
|
80
|
+
const states = input.until ?? [];
|
|
81
|
+
if (
|
|
82
|
+
!Array.isArray(states) ||
|
|
83
|
+
states.length > 5 ||
|
|
84
|
+
states.some((s) => !['idle', 'working', 'blocked', 'done', 'unknown'].includes(s))
|
|
85
|
+
)
|
|
86
|
+
throw new Error('Invalid wait states');
|
|
87
|
+
return [
|
|
88
|
+
'--timeout',
|
|
89
|
+
String(integer(input.timeout_ms, 30000, 120000)),
|
|
90
|
+
...states.flatMap((s) => ['--until', s]),
|
|
91
|
+
];
|
|
92
|
+
}
|
|
93
|
+
function readOptions(input: Record<string, unknown>): string[] {
|
|
94
|
+
const source = input.source ?? 'visible';
|
|
95
|
+
if (!['visible', 'recent', 'recent-unwrapped', 'detection'].includes(String(source)))
|
|
96
|
+
throw new Error('Invalid snapshot source');
|
|
97
|
+
return [
|
|
98
|
+
'--source',
|
|
99
|
+
String(source),
|
|
100
|
+
'--lines',
|
|
101
|
+
String(integer(input.lines, 80, 500)),
|
|
102
|
+
'--format',
|
|
103
|
+
'text',
|
|
104
|
+
];
|
|
105
|
+
}
|
|
106
|
+
function commandFor(
|
|
107
|
+
key: string,
|
|
108
|
+
input: Record<string, unknown>,
|
|
109
|
+
): { argv: string[]; json: boolean; budget: number } {
|
|
110
|
+
let argv: string[];
|
|
111
|
+
let budget = 15000;
|
|
112
|
+
let json = true;
|
|
113
|
+
switch (key) {
|
|
114
|
+
case 'snapshot':
|
|
115
|
+
argv = ['api', 'snapshot'];
|
|
116
|
+
break;
|
|
117
|
+
case 'process_info':
|
|
118
|
+
argv = ['pane', 'process-info', '--pane', id(input, 'pane_id')];
|
|
119
|
+
break;
|
|
120
|
+
case 'pane_read':
|
|
121
|
+
argv = ['pane', 'read', id(input, 'pane_id'), ...readOptions(input)];
|
|
122
|
+
json = false;
|
|
123
|
+
break;
|
|
124
|
+
case 'workspace_create': {
|
|
125
|
+
const cwd = text(input, 'cwd');
|
|
126
|
+
if (!cwd.startsWith('/'))
|
|
127
|
+
throw new Error('cwd must be an absolute path on the selected device');
|
|
128
|
+
argv = ['workspace', 'create', '--cwd', cwd, '--label', text(input, 'label'), '--no-focus'];
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
case 'workspace_close':
|
|
132
|
+
argv = ['workspace', 'close', id(input, 'workspace_id')];
|
|
133
|
+
break;
|
|
134
|
+
case 'agent_list':
|
|
135
|
+
argv = ['agent', 'list'];
|
|
136
|
+
break;
|
|
137
|
+
case 'agent_get':
|
|
138
|
+
argv = ['agent', 'get', id(input)];
|
|
139
|
+
break;
|
|
140
|
+
case 'agent_start': {
|
|
141
|
+
const name = text(input, 'name');
|
|
142
|
+
if (!/^[a-z][a-z0-9_-]{0,31}$/.test(name)) throw new Error('Invalid agent name');
|
|
143
|
+
const args = input.args ?? [];
|
|
144
|
+
if (
|
|
145
|
+
!Array.isArray(args) ||
|
|
146
|
+
args.length > 16 ||
|
|
147
|
+
args.some((a) => typeof a !== 'string' || a.length > 512)
|
|
148
|
+
)
|
|
149
|
+
throw new Error('Invalid agent arguments');
|
|
150
|
+
budget = integer(input.timeout_ms, 30000, 120000, 3001) + 5000;
|
|
151
|
+
argv = [
|
|
152
|
+
'agent',
|
|
153
|
+
'start',
|
|
154
|
+
name,
|
|
155
|
+
'--kind',
|
|
156
|
+
id(input, 'kind'),
|
|
157
|
+
'--pane',
|
|
158
|
+
id(input, 'pane_id'),
|
|
159
|
+
'--timeout',
|
|
160
|
+
String(budget - 5000),
|
|
161
|
+
'--',
|
|
162
|
+
...args,
|
|
163
|
+
];
|
|
164
|
+
break;
|
|
165
|
+
}
|
|
166
|
+
case 'agent_prompt': {
|
|
167
|
+
if (input.wait !== true && (input.timeout_ms !== undefined || input.until !== undefined))
|
|
168
|
+
throw new Error('timeout_ms and until require wait: true');
|
|
169
|
+
// Herdr takes positionals literally and accepts --timeout/--until only with --wait.
|
|
170
|
+
const wait = input.wait === true;
|
|
171
|
+
if (wait) budget = integer(input.timeout_ms, 30000, 120000) + 5000;
|
|
172
|
+
argv = [
|
|
173
|
+
'agent',
|
|
174
|
+
'prompt',
|
|
175
|
+
id(input),
|
|
176
|
+
text(input, 'text'),
|
|
177
|
+
...(wait ? ['--wait', ...waitOptions(input)] : []),
|
|
178
|
+
];
|
|
179
|
+
break;
|
|
180
|
+
}
|
|
181
|
+
case 'agent_wait':
|
|
182
|
+
budget = integer(input.timeout_ms, 30000, 120000) + 5000;
|
|
183
|
+
argv = ['agent', 'wait', id(input), ...waitOptions(input)];
|
|
184
|
+
break;
|
|
185
|
+
case 'agent_read':
|
|
186
|
+
argv = ['agent', 'read', id(input), ...readOptions(input)];
|
|
187
|
+
json = false;
|
|
188
|
+
break;
|
|
189
|
+
case 'agent_interrupt':
|
|
190
|
+
argv = ['agent', 'send-keys', id(input), 'ctrl+c'];
|
|
191
|
+
break;
|
|
192
|
+
default:
|
|
193
|
+
throw new Error(`Unknown Herdr operation: ${key}`);
|
|
194
|
+
}
|
|
195
|
+
return { argv, json, budget };
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export default class HerdrConnector extends ConnectorRuntime {
|
|
199
|
+
readonly definition: RuntimeConnectorDefinition = {
|
|
200
|
+
key: 'herdr',
|
|
201
|
+
name: 'Herdr',
|
|
202
|
+
version: '1.0.0',
|
|
203
|
+
faviconDomain: 'herdr.dev',
|
|
204
|
+
description:
|
|
205
|
+
'Inspect terminal workspaces and create, prompt, monitor or interrupt agents through an existing Shell connection. Requires Herdr 0.9+ installed and running on that device. Select shell_connection_id in connection settings; leave this connector on the server.',
|
|
206
|
+
authSchema: { methods: [{ type: 'none' }] },
|
|
207
|
+
feeds: {},
|
|
208
|
+
optionsSchema: {
|
|
209
|
+
type: 'object',
|
|
210
|
+
required: ['shell_connection_id'],
|
|
211
|
+
properties: {
|
|
212
|
+
shell_connection_id: {
|
|
213
|
+
type: 'integer',
|
|
214
|
+
minimum: 1,
|
|
215
|
+
title: 'Shell connection ID',
|
|
216
|
+
description:
|
|
217
|
+
'Discover the existing os.shell connection with operations.listAvailable. Its device and policies govern all commands.',
|
|
218
|
+
},
|
|
219
|
+
binary: {
|
|
220
|
+
type: 'string',
|
|
221
|
+
minLength: 1,
|
|
222
|
+
title: 'Herdr executable',
|
|
223
|
+
default: 'herdr',
|
|
224
|
+
description: 'Executable name or absolute path on the selected device.',
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
additionalProperties: false,
|
|
228
|
+
},
|
|
229
|
+
actions: {
|
|
230
|
+
snapshot: action(
|
|
231
|
+
'snapshot',
|
|
232
|
+
'Workspace snapshot',
|
|
233
|
+
'Structured workspaces, panes and agents from the running Herdr instance.',
|
|
234
|
+
'read',
|
|
235
|
+
),
|
|
236
|
+
process_info: action(
|
|
237
|
+
'process_info',
|
|
238
|
+
'Pane process',
|
|
239
|
+
'Inspect the foreground process in an explicit pane.',
|
|
240
|
+
'read',
|
|
241
|
+
{ pane_id: pane },
|
|
242
|
+
['pane_id'],
|
|
243
|
+
),
|
|
244
|
+
pane_read: action(
|
|
245
|
+
'pane_read',
|
|
246
|
+
'Read pane',
|
|
247
|
+
'Read bounded terminal output. Visible is passive; recent history may temporarily scroll idle terminals.',
|
|
248
|
+
'read',
|
|
249
|
+
{ pane_id: pane, ...read },
|
|
250
|
+
['pane_id'],
|
|
251
|
+
),
|
|
252
|
+
workspace_create: action(
|
|
253
|
+
'workspace_create',
|
|
254
|
+
'Create workspace',
|
|
255
|
+
'Create an unfocused workspace and return its root pane. Start an agent in that pane with agent_start.',
|
|
256
|
+
'write',
|
|
257
|
+
{
|
|
258
|
+
cwd: { type: 'string', pattern: '^/' },
|
|
259
|
+
label: { type: 'string', minLength: 1, maxLength: 100 },
|
|
260
|
+
},
|
|
261
|
+
['cwd', 'label'],
|
|
262
|
+
),
|
|
263
|
+
workspace_close: action(
|
|
264
|
+
'workspace_close',
|
|
265
|
+
'Close workspace',
|
|
266
|
+
'Close the specified workspace and its running processes. Use only for a workspace you intend to tear down.',
|
|
267
|
+
'write',
|
|
268
|
+
{ workspace_id: workspace },
|
|
269
|
+
['workspace_id'],
|
|
270
|
+
),
|
|
271
|
+
agent_list: action(
|
|
272
|
+
'agent_list',
|
|
273
|
+
'List agents',
|
|
274
|
+
'List registered agents and their state.',
|
|
275
|
+
'read',
|
|
276
|
+
),
|
|
277
|
+
agent_get: action(
|
|
278
|
+
'agent_get',
|
|
279
|
+
'Agent status',
|
|
280
|
+
'Inspect one agent by its returned name or pane id.',
|
|
281
|
+
'read',
|
|
282
|
+
{ target },
|
|
283
|
+
['target'],
|
|
284
|
+
),
|
|
285
|
+
agent_start: action(
|
|
286
|
+
'agent_start',
|
|
287
|
+
'Start agent',
|
|
288
|
+
'Start an installed interactive agent in an existing idle shell pane. Returns when that agent is detected and ready.',
|
|
289
|
+
'write',
|
|
290
|
+
{
|
|
291
|
+
name: { type: 'string', pattern: '^[a-z][a-z0-9_-]{0,31}$' },
|
|
292
|
+
kind: { ...target, description: 'Installed Herdr agent kind to start.' },
|
|
293
|
+
pane_id: pane,
|
|
294
|
+
timeout_ms: { ...timeout, minimum: 3001 },
|
|
295
|
+
args: { type: 'array', maxItems: 16, items: { type: 'string', maxLength: 512 } },
|
|
296
|
+
},
|
|
297
|
+
['name', 'kind', 'pane_id'],
|
|
298
|
+
),
|
|
299
|
+
agent_prompt: action(
|
|
300
|
+
'agent_prompt',
|
|
301
|
+
'Prompt agent',
|
|
302
|
+
'Submit a prompt or follow-up. timeout_ms and until require wait: true. Start from idle for reliable wait semantics: Herdr tracks terminal states, not turns. After timeout/stall, inspect before retrying; input may already have been delivered.',
|
|
303
|
+
'write',
|
|
304
|
+
{
|
|
305
|
+
target,
|
|
306
|
+
text: { type: 'string', minLength: 1, maxLength: 10000 },
|
|
307
|
+
wait: { type: 'boolean', default: false },
|
|
308
|
+
timeout_ms: timeout,
|
|
309
|
+
until,
|
|
310
|
+
},
|
|
311
|
+
['target', 'text'],
|
|
312
|
+
),
|
|
313
|
+
agent_wait: action(
|
|
314
|
+
'agent_wait',
|
|
315
|
+
'Wait for agent',
|
|
316
|
+
'Bounded state wait; already matching states return immediately. Cancelling this wait does not interrupt the persistent agent.',
|
|
317
|
+
'read',
|
|
318
|
+
{ target, timeout_ms: timeout, until },
|
|
319
|
+
['target'],
|
|
320
|
+
),
|
|
321
|
+
agent_read: action(
|
|
322
|
+
'agent_read',
|
|
323
|
+
'Read agent',
|
|
324
|
+
'Read bounded terminal output to verify the actual result of a turn.',
|
|
325
|
+
'read',
|
|
326
|
+
{ target, ...read },
|
|
327
|
+
['target'],
|
|
328
|
+
),
|
|
329
|
+
agent_interrupt: action(
|
|
330
|
+
'agent_interrupt',
|
|
331
|
+
'Interrupt agent',
|
|
332
|
+
'Send Ctrl+C to the explicitly selected agent. Inspect its state afterward.',
|
|
333
|
+
'write',
|
|
334
|
+
{ target },
|
|
335
|
+
['target'],
|
|
336
|
+
),
|
|
337
|
+
},
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
async execute(ctx: ActionContext): Promise<ActionResult> {
|
|
341
|
+
if (!ctx.operations)
|
|
342
|
+
return {
|
|
343
|
+
success: false,
|
|
344
|
+
error:
|
|
345
|
+
'This Lobu host does not support connector operation delegation. Update the Lobu server.',
|
|
346
|
+
};
|
|
347
|
+
const connectionId = ctx.config.shell_connection_id;
|
|
348
|
+
if (typeof connectionId !== 'number' || !Number.isSafeInteger(connectionId) || connectionId < 1)
|
|
349
|
+
return {
|
|
350
|
+
success: false,
|
|
351
|
+
error: 'Configure shell_connection_id with an existing os.shell connection.',
|
|
352
|
+
};
|
|
353
|
+
const command = commandFor(ctx.actionKey, ctx.input);
|
|
354
|
+
const binary = ctx.config.binary ?? 'herdr';
|
|
355
|
+
const receipt = await ctx.operations.execute({
|
|
356
|
+
connection_id: connectionId,
|
|
357
|
+
operation_key: 'run',
|
|
358
|
+
idempotency_key: 'herdr-command',
|
|
359
|
+
input: {
|
|
360
|
+
command: [binary, ...command.argv].map(quote).join(' '),
|
|
361
|
+
timeout_ms: command.budget,
|
|
362
|
+
},
|
|
363
|
+
});
|
|
364
|
+
if ('error' in receipt) return { success: false, error: receipt.error };
|
|
365
|
+
if (receipt.status === 'pending_approval' || receipt.status === 'in_progress')
|
|
366
|
+
return { success: true, output: { ...receipt } };
|
|
367
|
+
if (receipt.status !== 'completed') return { success: false, error: JSON.stringify(receipt) };
|
|
368
|
+
const shell = receipt.output as {
|
|
369
|
+
exit_code?: number;
|
|
370
|
+
timed_out?: boolean;
|
|
371
|
+
stdout?: string;
|
|
372
|
+
stderr?: string;
|
|
373
|
+
};
|
|
374
|
+
let result: unknown = shell?.stdout ?? '';
|
|
375
|
+
if (command.json && typeof result === 'string' && shell?.exit_code === 0 && !shell?.timed_out) {
|
|
376
|
+
try {
|
|
377
|
+
result = JSON.parse(result);
|
|
378
|
+
} catch {
|
|
379
|
+
return {
|
|
380
|
+
success: false,
|
|
381
|
+
error: `Herdr returned invalid JSON (shell run ${receipt.run_id}); inspect that run before retrying.`,
|
|
382
|
+
};
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
if (
|
|
386
|
+
!shell ||
|
|
387
|
+
shell.exit_code !== 0 ||
|
|
388
|
+
shell.timed_out ||
|
|
389
|
+
(typeof result === 'object' && result !== null && 'error' in result)
|
|
390
|
+
) {
|
|
391
|
+
return {
|
|
392
|
+
success: false,
|
|
393
|
+
error: JSON.stringify({
|
|
394
|
+
run_id: receipt.run_id,
|
|
395
|
+
exit_code: shell?.exit_code,
|
|
396
|
+
timed_out: shell?.timed_out,
|
|
397
|
+
result,
|
|
398
|
+
stderr: shell?.stderr?.slice(-2000),
|
|
399
|
+
message:
|
|
400
|
+
'Inspect this run before retrying. A command or prompt may already have been delivered.',
|
|
401
|
+
}),
|
|
402
|
+
};
|
|
403
|
+
}
|
|
404
|
+
return { success: true, output: { status: 'completed', run_id: receipt.run_id, result } };
|
|
405
|
+
}
|
|
406
|
+
}
|
package/dist/connectors/jira.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Jira Connector (V1 runtime)
|
|
3
3
|
*
|
|
4
|
-
* Reads Jira Cloud issues via JQL and can sync them into events.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Reads Jira Cloud issues via JQL and can sync them into events. App-level
|
|
5
|
+
* webhook deliveries are verified and routed to the owning install, but the
|
|
6
|
+
* connector declares no webhook event type, so they trigger nothing yet.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { randomBytes } from 'node:crypto';
|
|
@@ -304,8 +304,8 @@ export default class JiraConnector extends ConnectorRuntime<JiraCheckpoint, Jira
|
|
|
304
304
|
key: 'jira',
|
|
305
305
|
name: 'Jira',
|
|
306
306
|
description:
|
|
307
|
-
'Syncs and live-reads Jira Cloud issues via JQL
|
|
308
|
-
version: '1.1.
|
|
307
|
+
'Syncs and live-reads Jira Cloud issues via JQL.',
|
|
308
|
+
version: '1.1.5',
|
|
309
309
|
faviconDomain: 'atlassian.com',
|
|
310
310
|
webhook: {
|
|
311
311
|
// Jira Connect app webhooks HMAC-sign the raw body with the installation
|
|
@@ -612,7 +612,7 @@ export default class JiraConnector extends ConnectorRuntime<JiraCheckpoint, Jira
|
|
|
612
612
|
}
|
|
613
613
|
|
|
614
614
|
// -------------------------------------------------------------------------
|
|
615
|
-
// Webhooks (subscription lifecycle —
|
|
615
|
+
// Webhooks (subscription lifecycle — per-connection deliveries are stored raw)
|
|
616
616
|
// -------------------------------------------------------------------------
|
|
617
617
|
|
|
618
618
|
async registerWebhook(
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Linear Connector (V1 runtime)
|
|
3
3
|
*
|
|
4
4
|
* Reads Linear issues via GraphQL and can sync them into events.
|
|
5
|
-
* Real-time Issue/Comment deliveries
|
|
6
|
-
*
|
|
5
|
+
* Real-time Issue/Comment deliveries mark the issues feed due, so the poll
|
|
6
|
+
* fetches the changed issues.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { randomBytes } from 'node:crypto';
|
|
@@ -152,7 +152,7 @@ export default class LinearConnector extends ConnectorRuntime<LinearCheckpoint,
|
|
|
152
152
|
name: 'Linear',
|
|
153
153
|
description:
|
|
154
154
|
'Syncs and live-reads Linear issues via GraphQL, and receives real-time issue/comment webhooks.',
|
|
155
|
-
version: '1.
|
|
155
|
+
version: '1.2.0',
|
|
156
156
|
faviconDomain: 'linear.app',
|
|
157
157
|
webhook: {
|
|
158
158
|
signatureHeader: 'linear-signature',
|
|
@@ -160,6 +160,7 @@ export default class LinearConnector extends ConnectorRuntime<LinearCheckpoint,
|
|
|
160
160
|
// Linear signs the raw body with HMAC-SHA256 and sends a bare hex digest
|
|
161
161
|
// (no `sha256=` prefix). It does not send a stable delivery id header, so
|
|
162
162
|
// dedupe falls back to a body hash (no `dedupeHeader`).
|
|
163
|
+
eventType: { path: 'type' },
|
|
163
164
|
// App-installation delivery: one webhook configured ONCE on the Linear app;
|
|
164
165
|
// every delivery carries the workspace `organizationId` — that's the tenant.
|
|
165
166
|
delivery: 'app_installation',
|
|
@@ -193,6 +194,8 @@ export default class LinearConnector extends ConnectorRuntime<LinearCheckpoint,
|
|
|
193
194
|
sync: (ctx) => this.syncFeed(ctx),
|
|
194
195
|
read: (ctx) => this.readFeed(ctx),
|
|
195
196
|
readWindowAxis: 'updated_at',
|
|
197
|
+
// A comment also moves its issue's updatedAt, so both wake the poll.
|
|
198
|
+
webhook: { events: ['Issue', 'Comment'] },
|
|
196
199
|
configSchema: {
|
|
197
200
|
type: 'object',
|
|
198
201
|
properties: {
|
|
@@ -397,7 +400,7 @@ export default class LinearConnector extends ConnectorRuntime<LinearCheckpoint,
|
|
|
397
400
|
}
|
|
398
401
|
|
|
399
402
|
// -------------------------------------------------------------------------
|
|
400
|
-
// Webhooks (subscription lifecycle
|
|
403
|
+
// Webhooks (subscription lifecycle; the platform dispatches deliveries)
|
|
401
404
|
// -------------------------------------------------------------------------
|
|
402
405
|
|
|
403
406
|
async registerWebhook(
|